| From: | David Fetter <david(at)fetter(dot)org> |
|---|---|
| To: | semi-ambivalent <thefronny(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: auto-filling a field on insert |
| Date: | 2009-10-22 02:54:07 |
| Message-ID: | 20091022025407.GC27368@fetter.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Wed, Oct 21, 2009 at 07:17:44PM -0700, semi-ambivalent wrote:
> If I have a table with fields A, B, C and D how could I do something
> such that if I insert values in fields A, B and C field D would be
> auto-filled with the value A||B||C? Just a pointer of where to begin
> looking is fine. Triggers? Copy ... From? Table or field
> definitions?
Instead of populating your table with this extra information, create a
VIEW with what you want in it.
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Marlowe | 2009-10-22 03:42:52 | Re: postgres doesn't start after crash |
| Previous Message | semi-ambivalent | 2009-10-22 02:17:44 | auto-filling a field on insert |