pgsql2shp error when query is introduced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Community,

I am trying to create a shp file from the command line by using pgsql2shp
for a specific query of an existing database table.

I am able to use this command to create a shp without the query where the
database name is forGgis and the table name is COVER63p_prj32119:

C:\Program Files (x86)\OpenGeo\OpenGeo Suite\pgsql\8.4\bin>.\pgsql2shp.exe
-f C:\temp\test03.shp -h localhost -u postgres -p 54321 forQgis
public.COVER63p_prj32119

Also, I am able to get the desired results of the query from the sql editor
pgAdmin III using:
SELECT *
FROM public."COVER63p_prg32119"
WHERE "COVER63p_prg32119".cover = 'woods';



However, when I drop the table name from the end of the previously working
command and add the query information to the end of the command line:

C:\Program Files (x86)\OpenGeo\OpenGeo Suite\pgsql\8.4\bin>.\pgsql2shp.exe
-f C:\temp\test04.shp -h localhost -u postgres -p 54321 forQgis "SELECT *
FROM public.COVER63p_prg32119 WHERE COVER63p_prg32119.cover = 'woods'"

I see....

Preparing table for user query... Failed: ERROR:  relation
"public.cover63p_prg3
2119" does not exist
LINE 1: ...ABLE "__pgsql2shp5596_tmp_table" AS SELECT * FROM public.COV...
(there was a carrot pointing to the p in public after the FROM)

I have tried this statement in many different configurations using single
quotes, double quotes, and without using the "." functionality to be more
specific about where the table is stored and which table holds the variable
of interest for the where part of the statement.

Any thoughts? Something must be wrong with my syntax???

Thanks,
Stacy



--
View this message in context: http://postgresql.1045698.n5.nabble.com/pgsql2shp-error-when-query-is-introduced-tp4677943p4677943.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux