Within PHP I do:
1.) A temporary table is created: CREATE TEMP TABLE new_table AS SELECT .... FROM ...;
2.) AFter that I want to use this table to create a shape file: shell_exec ("pgsql2shp .... -u username -P password ...);
Separetly those two things work, but by creating a temporary table and after that using this table in pgsql2shp does not work. I pressume this is because temporary table duration is to the end of session. But to create shp file I need to use username and password what means new session starts and temporary table is dropped before I use it for shape creation.
Any tip how to solve it?
Thank you!