From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Scott Muir" <wsmuir(at)islandnet(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: FW: look-up cache failures |
Date: | 2001-03-13 15:37:02 |
Message-ID: | 19411.984497822@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
"Scott Muir" <wsmuir(at)islandnet(dot)com> writes:
> if I happen to make a modification (using pgaccess) to a view which
> has another view which uses it, it corrupts things and I have to drop
> all of the views which make reference to the modified one and recreate
> them... OR I can use pg_dump to allow me to make the modifications to
> a dumpfile, drop the db and recreate using the modified dump.
Cross-references between views and functions are stored in terms of OIDs.
If you drop and re-create a view or function, the new object has a new
OID, so it doesn't satisfy the pre-existing references.
We really need some kind of ALTER FUNCTION/ALTER VIEW command so that
you can modify the contents of a function or view without changing its
OID.
In the meantime, what most people do is to define sets of related
functions and views in scripts:
DROP FUNCTION foo(...);
CREATE FUNCTION foo(...) ...;
DROP VIEW v;
CREATE VIEW v ...;
If you need to make a change, edit the script and then feed it to psql.
Being able to use a real text editor on the script is a big improvement
over typing directly at psql anyway.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Brett W. McCoy | 2001-03-13 15:37:41 | Re: perl installation problem |
Previous Message | Ken Corey | 2001-03-13 14:55:54 | Re: Fwd: Silly question about numbering of rows? |