pg_dump, psql load problem

From: Tom Jenkins <tjenkins(at)devis(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump, psql load problem
Date: 2003-08-06 19:47:57
Message-ID: 3F315B6D.2050005@devis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hey all,
one of our applications has the following view:
- --
- -- TOC Entry ID 85 (OID 27519291)
- --
- -- Name: inusecountrycode Type: VIEW Owner: postgres
- --

CREATE VIEW "inusecountrycode" as SELECT DISTINCT
countryname.seviscountrycodeid AS countrycode FROM countryname,
sevisrecordworking WHERE (countryname.seviscountrycodeid =
sevisrecordworking.permanentresidencecountrycode) ORDER BY
countryname.seviscountrycodeid UNION SELECT DISTINCT
countryname.seviscountrycodeid AS countrycode FROM countryname,
sevisrecordofficial WHERE (countryname.seviscountrycodeid =
sevisrecordofficial.permanentresidencecountrycode) ORDER BY
countryname.seviscountrycodeid;

that is what gets dumped via pg_dump. however if we take that statement
and paste it into psql (as one long line) or through command line (ie
psql dbname < inusecountrycode.schema) we get an error:
'ERROR: parser: parse error at or near "SELECT"'

if i manually change the definition to put parenthesis around each
select statement, then psql has no problem. also, if i break the
statement up into individual lines and paste it into psql, i will not
get the error.

vcsdev=# select version();
~ version
- ---------------------------------------------------------------
~ PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.95.4
(1 row)

note - we have not yet tested this application over to 7.3 so i can't
test it there.

has anyone seen anything similar?
- --
Tom Jenkins
devIS - Development Infostructure
http://www.devis.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0-nr2 (Windows XP)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/MVttV7Yk9/McDYURAvUZAKCJ+SrH03FmJgI28FWKMsaxmqbjZACcCHU+
wjPqCk0ktVz2Q9y7L/Dqpww=
=luSU
-----END PGP SIGNATURE-----

Responses

Browse pgsql-general by date

  From Date Subject
Next Message DeJuan Jackson 2003-08-06 20:05:19 Re: pg_xlog question
Previous Message Oleg Bartunov 2003-08-06 19:10:42 Re: tsearch2: Error: Word is too long