Problem with pgsql2shp - thinks I'm passing a table instead of a query?

Поиск
Список
Период
Сортировка
От Bryan Montgomery
Тема Problem with pgsql2shp - thinks I'm passing a table instead of a query?
Дата
Msg-id CAPTJ3=cQAiiz0pSD=cm-t83-zdZFMqZYk5oK5tEx0wLk_tLOKA@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hello,

It seems that the program is thinking I'm passing a table but instead I'm passing a query. Now, I could put a hack in place, create a view and pass that to pgsql2shp but I thought I'd ask whether anyone else has seen this behavior and has a way to force / trick the program to treat the parameter as a query.

I'm using this version $Id: pgsql2shp.c 5451 2010-03-22 19:38:40Z pramsey $ RELEASE: 1.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1 and run the command below (I've truncated it for brevity), the sql runs fine in pgadmin.

pgsql2shp -h 10.168.111.144 -f FileEg mydb "
SELECT
m.id1,
m.id2,
10 as OPID,
'Name Here' as OPER_NM,
linedesc as SYS_NM,

and more ...

From the server, the sql being passed to it is:
ERROR:  syntax error at or near "Name Here" at character 255

SELECT a.attname, a.atttypid, a.atttypmod FROM pg_attribute a, pg_class c, pg_namespace n WHERE n.nspname = '
        SELECT
        m' AND a.attrelid = c.oid AND n.oid = c.relnamespace AND a.atttypid != 0 AND a.attnum > 0 AND c.relname = 'id1,
        m.id2,
        10 as OPID,
        'Name Here' as OPER_NM,
        linedesc as SYS_NM,
       

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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: Large PostgreSQL servers
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Large PostgreSQL servers