| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Merlin Moncure" <mmoncure(at)gmail(dot)com> |
| Cc: | "PG Hackers" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: idea: storing view source in system catalogs |
| Date: | 2008-05-20 22:58:45 |
| Message-ID: | 7079.1211324325@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"Merlin Moncure" <mmoncure(at)gmail(dot)com> writes:
> I wonder if there is any merit to the idea of storing the 'create
> view' statement that created the view in an appropriate place.
No, there isn't.
As counterexamples look at pg_constraint.consrc and pg_attrdef.adsrc,
both of which were mistakes from the day they were put in, and have
been deprecated for a long time. Source doesn't have any reasonable
way to track table/column renames, to point out one problem.
> If I do:
> create view v as select * from foo;
> The view definition as understood by the database expands the column
> list.
Indeed, exactly as is *required* by the SQL spec.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Florian Pflug | 2008-05-20 23:17:51 | Re: idea: storing view source in system catalogs |
| Previous Message | David Fetter | 2008-05-20 21:11:10 | Re: idea: storing view source in system catalogs |