Re: Datetime and pgtypes.c - Mailing list pgsql-odbc

From Tom Lane
Subject Re: Datetime and pgtypes.c
Date
Msg-id 23240.1038926735@sss.pgh.pa.us
Whole thread Raw
In response to Re: Datetime and pgtypes.c  ("alexandre :: aldeia digital" <alepaes@aldeiadigital.com.br>)
List pgsql-odbc
"alexandre :: aldeia digital" <alepaes@aldeiadigital.com.br> writes:
> I have a lot of CREATE scripts using �datetime�
> correctly in PG <= 7.2.3...PG convert automaticaly
> to �timestamp with time zone�.
> But I can�t change the �datetime� in these scripts and
> PG 7.3 remove this type.

If you can't afford the time to fix your scripts, you could use a DOMAIN
as a form of type alias:

regression=# create domain datetime timestamp with time zone;
CREATE DOMAIN
regression=# create table fooey (f1 datetime);
CREATE TABLE
regression=# select datetime('now');
           datetime
-------------------------------
 2002-12-03 09:44:46.458992-05
(1 row)

There might be some cases where this doesn't help, but I think it will
work for most of the common uses.

            regards, tom lane

pgsql-odbc by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Free ODBC driver for linux ? ( NOT windows!)
Next
From: "alexandre :: aldeia digital"
Date:
Subject: Re: Datetime and pgtypes.c (thanks)