Re: [HACKERS] Adding a field to each tuple

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: mgittens(at)gits(dot)nl (Maurice Gittens)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Adding a field to each tuple
Date: 1998-02-26 14:31:48
Message-ID: 199802261431.JAA13929@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I certainly do appreciate any help I can get.
> >
> > This is a lot of overhead for places it is not needed.
> >
>
> Any suggestions for solving the general given problem with less overhead?-:)

Yes, this is a natural use for a trigger. Create the column in the base
table, and have it stuff the value on insert. You have to make the
trigger on each derived table, but you may be able to use the same
trigger on all tables. This is how we are implementing time travel.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Maurice Gittens 1998-02-26 14:42:42 Re: [HACKERS] Adding a field to each tuple
Previous Message Bruce Momjian 1998-02-26 14:27:22 Re: [HACKERS] mode of libs