Hello

PostgreSQL 7.0.2 on Red Hat 6.2 & 5.2 & SuSe ?

A long time ago it was advised that I use datetime_in("now") to get the
time for use in contrib/spi/moddatetime.c.

...
    Datum       newdt;          /* The current datetime. */
...
    /* Get the current datetime. */
    newdt = datetime_in("now"); // This is line 67
...
    rettuple = SPI_modifytuple(rel, rettuple, 1, &attnum, &newdt, NULL);
...

But now when I try to compile:

gcc -I../../src/include -I../../src/backend   -O2 -Wall
-Wmissing-prototypes -Wmissing-declarations -fpic -I../../src/include  
-c -o moddatetime.o moddatetime.c
moddatetime.c: In function `moddatetime':
moddatetime.c:67: warning: implicit declaration of function
`datetime_in'
moddatetime.c:89: `DATETIMEOID' undeclared (first use in this function)
moddatetime.c:89: (Each undeclared identifier is reported only once
moddatetime.c:89: for each function it appears in.)
make: *** [moddatetime.o] Error 1
rm timetravel.o

Does the function datetime_in() still exist?
If not, what should be used in it's stead?

I've looked around the docs and mail archives, but found nothing useful
on this.

Thanks

Terry Mackintosh <terry@terrym.com>          http://www.terrym.com
sysadmin/owner                     http://www.shell-connection.com
Proudly powered by R H Linux, Apache, PHP, PostgreSQL
"If you don't know where you are going, how can you get there?"

Wed, 16 Aug 2000 16:39:43 -0400
Terry Mackintosh <terry@terrym.com>
datetime_in()
> Does the function datetime_in() still exist?
> If not, what should be used in it's stead?

Use timestamp_in() and TIMESTAMPOID instead. It is related to the topic
in the release notes for 7.0 that datetime has been deprecated and the
(formerly barely functional) timestamp has taken its place.

                       - Thomas

Thu, 17 Aug 2000 04:41:18 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: datetime_in()