| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Richard Huxton <dev(at)archonet(dot)com> |
| Cc: | btober(at)seaworthysys(dot)com, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Column defaults fail with rules on view |
| Date: | 2003-09-19 15:53:39 |
| Message-ID: | 20936.1063986819@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Richard Huxton <dev(at)archonet(dot)com> writes:
> On Friday 19 September 2003 16:04, Tom Lane wrote:
>> What Berend actually wants is to attach column defaults to the *view*,
>> so that they apply to an INSERT mentioning the view. You can do this in
>> recent PG releases (7.3 for sure, not sure about 7.2) using ALTER TABLE
>> ... ADD DEFAULT.
> Am I right in thinking that *in theory* we should be able to "inherit" the
> defaults to the view automatically?
[shrug] Maybe, in simple cases. I'm not convinced it'd be especially
useful. The defaults applicable to direct inserts into a table aren't
necessarily sensible for inserts via a view.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | scott.marlowe | 2003-09-19 15:57:58 | Re: PostgreSQL versus MySQL |
| Previous Message | btober | 2003-09-19 15:53:26 | Re: Column defaults fail with rules on view |