Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] pg_dump(all) and views, broke

From: jwieck(at)debis(dot)com (Jan Wieck)
To: terry(at)terrym(dot)com (Terry Mackintosh)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] pg_dump(all) and views, broke
Date: 1998-11-25 17:31:22
Message-ID: m0ziimg-000EBQC@orion.SAPserv.Hamburg.dsh.de (view raw or flat)
Thread:
Lists: pgsql-hackers
>
> Hi all
>
> CREATE RULE "_RETmessages" AS ON SELECT TO "messages" DO INSTEAD SELECT
> "title", "mess", "iurl", "lurl", "posted", "fname", "lname", "email",
> "uid", "ppid", "pid", "bid" FROM "post", "users" WHERE "uid" = "uid";
> ERROR:  Column uid is ambiguous
>
> It left off the table names from 'WHERE "uid" = "uid";'
>
> I do not profess to understand all this rule stuff, but I don't understand
> why when I create a view using 'create view ....', then why does pg_dump
> need to create the view as a table, then later create a rule to make the
> table into a view?  Why not just dump a 'create view ....' command
> instead?  Not that it matters, as long as it works, just seems confusing
> is all.

    Creating  a table first and turn it later into view by CREATE
    RULE is just for simplification of pg_dump. It does not  need
    to  make  a  difference between those rules that are handmade
    production rules and those that came in due to CREATE VIEW.

    But the above is a bug and I'll fix it soon.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #



In response to

Responses

pgsql-hackers by date

Next:From: Sbragion DenisDate: 1998-11-25 17:40:44
Subject: Re: [INTERFACES] Postgres mentioned in Information Week
Previous:From: Terry MackintoshDate: 1998-11-25 17:26:29
Subject: pg_dump(all) and views, broke

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group