pgsql2shp error when query is introduced

Поиск
Список
Период
Сортировка
От antismarmy
Тема pgsql2shp error when query is introduced
Дата
Msg-id 1312814734716-4677943.post@n5.nabble.com
обсуждение исходный текст
Список pgsql-admin
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.

В списке pgsql-admin по дате отправления:

Предыдущее
От: Lou Picciano
Дата:
Сообщение: Re: Postgresql 9.0.1 installation error
Следующее
От: antismarmy
Дата:
Сообщение: Re: All the functionality I need is pgsql2shp.exe-- isolated installation