Re: Auto-timestamp generator (attached)

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: Peter T Mount <peter(at)retep(dot)org(dot)uk>, Einar Karttunen <ekarttun(at)cs(dot)Helsinki(dot)FI>, Richard Huxton <dev(at)archonet(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Auto-timestamp generator (attached)
Date: 2001-05-08 00:58:37
Message-ID: 3AF744BD.29104CA6@selectacast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Didn't make it into 7.1.1 either.

Joseph Shraibman wrote:
>
> It doesn't look as if this ever made it into contrib for 7.1
>
> Peter T Mount wrote:
> >
> > Quoting Einar Karttunen <ekarttun(at)cs(dot)Helsinki(dot)FI>:
> >
> > > I think that modules like this could be included in the distribution or
> > > archieved at the ftp. They'd make it easier for people new to sql to
> > > start using postgresql. Also there would be no performance loss in
> > > the backend code, as these "modules" don't need any support.
> >
> > This is what /contrib in the source is for ;-)
> >
> > Peter
> >
> > >
> > > - Einar
> > >
> > > On Thu, 8 Feb 2001, Richard Huxton wrote:
> > > > Following the 'new type proposal' discussion recently I decided to
> > > have a
> > > > play at creating an automatic trigger generator. Attached is the sql
> > > and an
> > > > example of its use.
> > > >
> > > > Basically you call a function:
> > > > select lastchg_addto(mytable,mycol);
> > > > where mycol is of type timestamp. The function builds the
> > > >
> > > > To use it you will need plpgsql enabled (man createlang) and also
> > > version
> > > > 7.1
> > > > After use, there are two functions left - you can remove these with:
> > > > drop function lastchg_addto(text,text);
> > > > drop function lastchg_remove(text,text);
> > > >
> > > > I've tried to layout the plpgsql for ease of understanding - if you
> > > want to
> > > > see how the trigger gets created, you can return exec1 or exec2
> > > instead of
> > > > the success message.
> > > >
> > > > This just a demo - obviously it's fairly simple to put together
> > > triggers for
> > > > this purpose, but I'd appreciate any thoughts about the approach.
> > > >
> > > > TIA people
> > > >
> > > > Oh - 2 questions for any of the developers/clued up
> > > >
> > > > 1. Is there any way to parse a variable-length list of parameters in
> > > > plpgsql?
> > > > 2. Is there any chance of a different quoting method for functions?
> > > e.g.
> > > > create function ... as q[ ...body here ...];
> > > > So we can avoid the '''' stuff - it's a lot of static
> > > >
> > > > - Richard Huxton
> > > >
> > >
> > >
> >

--
Joseph Shraibman
jks(at)selectacast(dot)net
Increase signal to noise ratio. http://www.targabot.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Shraibman 2001-05-08 00:59:42 Re: [GENERAL] A different compile problem for 7.1.1
Previous Message Tom Lane 2001-05-08 00:09:14 Re: Fixed width COPY