Question/problem with create view and restore a backup with such a view - Mailing list pgsql-general

From Franz.Rasper@izb.de
Subject Question/problem with create view and restore a backup with such a view
Date
Msg-id D30121FCD4ADD51181D10002A587391608A04902@M0000S0E
Whole thread Raw
Responses Re: Question/problem with create view and restore a backup with such a view
List pgsql-general

Hello,

i have following situation:

Postgres 7.2.1 (Debian woody)

I created a view (look into the attached file, the file was converted with nedit from unix to windows )
and if I paste it into psql it works. I can also do a select on this view (it works and is correct).

But if a want to restore a backup of this view it doesnt work.
(backup was done with pg_dump, restore with pg_restore or cat file | psql database ).

So i decided to look at the definition of this view with \d viewname and try to put this
output into psql and I got the following error message:

ERROR:  parser: parse error at or near "SELECT"

I already wrote an small awk programme and relpaced " " by "\n" removed
all empty lines and compared the two output files with vimdiff, but I have
not found the error.

What is the best way to compare such sql statement in postgres ?
Any very special DEBUG switch at psql or statement in the postgresql.conf ?

Thanks in advance.
Best regards,

-Franz

<<createview.sql>>

Attachment

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: PostgreSQL Gotchas
Next
From: "Jim C. Nasby"
Date:
Subject: Re: fine tuned database dump/reload?