Problem parsing functions makes PgSQL Restore impossible

Поиск
Список
Период
Сортировка
От sth@bsbg.net (Stefan Hadjistoytchev)
Тема Problem parsing functions makes PgSQL Restore impossible
Дата
Msg-id 6ffcbdfe.0111241557.c63842f@posting.google.com
обсуждение исходный текст
Список 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

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

Предыдущее
От: shield123321@hotmail.com
Дата:
Сообщение: Setting up MAKE file for Postgres and C++/Newbie question
Следующее
От: sara_software@hotmail.com (sara_software)
Дата:
Сообщение: Rule