Skip site navigation (1) Skip section navigation (2)

Re: Datetime and pgtypes.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "alexandre :: aldeia digital" <alepaes(at)aldeiadigital(dot)com(dot)br>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Datetime and pgtypes.c
Date: 2002-12-03 14:45:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
"alexandre :: aldeia digital" <alepaes(at)aldeiadigital(dot)com(dot)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 cant 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;
regression=# create table fooey (f1 datetime);
regression=# select datetime('now');
 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

In response to

pgsql-odbc by date

Next:From: alexandre :: aldeia digitalDate: 2002-12-03 16:14:18
Subject: Re: Datetime and pgtypes.c (thanks)
Previous:From: Dave PageDate: 2002-12-03 12:55:25
Subject: Re: Free ODBC driver for linux ? ( NOT windows!)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group