The following bug has been logged online:

Bug reference:      2215
Logged by:          Sokolov Yura
Email address:      [EMAIL PROTECTED]
PostgreSQL version: 8.1.2
Operating system:   Windows XP SP2, Slackware 10.2
Description:        Cannot restore backup cause of view's representaion
Details: 

View's text representation is wrong, when row_value used inside a view.

Example:

--Create table and view

create table test
(
   i int4,
   j int4
);

create view test_v as
select (r.t).i,(r.t).j
from (select t.i,t.j,t  from test t) r
where r.i = 1;

/*
-- this is what pgadmin and plain text dump show
CREATE VIEW test_v AS
    SELECT (r.t).i AS i, (r.t).j AS j FROM (SELECT t.i, t.j, t.* AS t FROM
test t) r WHERE (r.i = 1);
*/

/*
-- this is how pg_restore throw pgadmin scold
pg_restore: [archiver (db)] could not execute query: ERROR:  column r.t does
not exist
    Command was: CREATE VIEW test_v AS
    SELECT (r.t).i AS i, (r.t).j AS j FROM (SELECT t.i, t.j, t.* AS t FROM
test t) r WHERE (r.i = 1);
*/

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to