Hi all

I started with the contrib/spi/*.c stuff and am working toward a function
to be used by a trigger to update a datetime field upon doing an UPDATE to
a record.

It is about ready to test, except one thing :)

Is there a function like GetCurrentAbsoluteTime() that will get the
current time in a form suitable for inserting into a datetime field?

GetCurrentDatetimeTime() maybe???
or a convertion function?

Thanks
Terry Mackintosh <terry@terrym.com>          http://www.terrym.com
sysadmin/owner  Please! No MIME encoded or HTML mail, unless needed.

Proudly powered by R H Linux 4.2, Apache 1.3, PHP 3, PostgreSQL 6.3
-------------------------------------------------------------------
Success Is A Choice ... book by Rick Patino, get it, read it!


Fri, 6 Nov 1998 14:39:30 -0500 (EST)
Terry Mackintosh <terry@terrym.com>
SPI hacking
> 
> Hi all
> 
> I started with the contrib/spi/*.c stuff and am working toward a function
> to be used by a trigger to update a datetime field upon doing an UPDATE to
> a record.
> 
> It is about ready to test, except one thing :)
> 
> Is there a function like GetCurrentAbsoluteTime() that will get the
> current time in a form suitable for inserting into a datetime field?
> 
> GetCurrentDatetimeTime() maybe???
> or a convertion function?

    What about datetime_in("now") ?


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #


Fri, 6 Nov 1998 21:41:17 +0100 (MET)
jwieck@debis.com (Jan Wieck)
Re: [HACKERS] SPI hacking
On Fri, 6 Nov 1998, Jan Wieck wrote:

> > 
> > Hi all
> > 
> > I started with the contrib/spi/*.c stuff and am working toward a function
> > to be used by a trigger to update a datetime field upon doing an UPDATE to
> > a record.
...
>     What about datetime_in("now") ?
> Jan

Yes, that's it! 
(Where is this documented at?)

Well, here it is, seems to work.
The attached file is intended to be uppacked in
/usr/src/pgsql/contrib/spi/ (on my box any way)
and has a diff file for Makefile and the rest are new files.

I'm in a hurry, got to go, so have not tested it but a little bit.

Hope it is usefull.
Terry Mackintosh <terry@terrym.com>          http://www.terrym.com
sysadmin/owner  Please! No MIME encoded or HTML mail, unless needed.

Proudly powered by R H Linux 4.2, Apache 1.3, PHP 3, PostgreSQL 6.3
-------------------------------------------------------------------
Success Is A Choice ... book by Rick Patino, get it, read it!
Fri, 6 Nov 1998 16:27:53 -0500 (EST)
Terry Mackintosh <terry@terrym.com>
New SPI contrib stuff, was Re: [HACKERS] SPI hacking
Patch applied to developers tree.

> On Fri, 6 Nov 1998, Jan Wieck wrote:
> 
> > > 
> > > Hi all
> > > 
> > > I started with the contrib/spi/*.c stuff and am working toward a function
> > > to be used by a trigger to update a datetime field upon doing an UPDATE to
> > > a record.
> ...
> >     What about datetime_in("now") ?
> > Jan
> 
> Yes, that's it! 
> (Where is this documented at?)
> 
> Well, here it is, seems to work.
> The attached file is intended to be uppacked in
> /usr/src/pgsql/contrib/spi/ (on my box any way)
> and has a diff file for Makefile and the rest are new files.
> 
> I'm in a hurry, got to go, so have not tested it but a little bit.
> 
> Hope it is usefull.
> Terry Mackintosh <terry@terrym.com>          http://www.terrym.com
> sysadmin/owner  Please! No MIME encoded or HTML mail, unless needed.
> 
> Proudly powered by R H Linux 4.2, Apache 1.3, PHP 3, PostgreSQL 6.3
> -------------------------------------------------------------------
> Success Is A Choice ... book by Rick Patino, get it, read it!
Content-Description: 

[application/octet-stream is not supported, skipping...]


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sat, 12 Dec 1998 15:21:15 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: New SPI contrib stuff, was Re: [HACKERS] SPI hacking