From: | sth(at)bsbg(dot)net (Stefan Hadjistoytchev) |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Problem parsing functions makes PgSQL Restore impossible |
Date: | 2001-11-24 23:57:14 |
Message-ID: | 6ffcbdfe.0111241557.c63842f@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi!
I think I found a problem (bug?) in PgSQL:
If there is a:
<functionA>( <functionB> ( args...) )
in a CREATE VIEW, PgSQL then translates it as:
<functionB> ( args... ).<functionB>.
This makes 'pg_dump' generate invalid Views and thus Views could not
be restored afterwards :(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EXAMPLE taken (part of a real View) from PgAdmin views:
1. Written:
CREATE VIEW test AS SELECT
sequence_last_value(pgadmin_get_sequence(c.oid)) AS
sequence_last_value FROM pg_class c;
2. pg_dump generates ?!?:
CREATE VIEW test AS SELECT
pgadmin_get_sequence(c.oid).sequence_last_value AS sequence_last_value
FROM pg_class c;
NOTE: PgAdmin also shows the same data!
3. psql restores data generated by pg_dump and produces an error:
ERROR: parser: parse error at or near "."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BACKGROUND:
I user PostgreSQL 7.1.3 and PgAdmin 7.1.0 (both latest versions I
hope);
After PgAdmin openes a database it usually creates a number of system
Tables and Views that start with 'pgadmin_'.
After a pg_dump is made on such a database and then restored
2 errors appeare in CREATE VIEW part as discribed above.
Errors are during creation of VIEWS named 'pgadmin_sequences' and
'pgadmin_tables'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
QUESTION:
What should I do to successfully Backup & Restore these (or such type)
of Views?
Best regards
sth
From | Date | Subject | |
---|---|---|---|
Next Message | Randal L. Schwartz | 2001-11-25 01:24:10 | [off-topic] news.postgresql.org down? |
Previous Message | Andrew Snow | 2001-11-24 22:45:18 | Re: Postgresql Not working.. |