From: Tom Lane <tgl@sss.pgh.pa.us>
To: alexandre :: aldeia digital <alepaes@aldeiadigital.com.br>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Datetime and pgtypes.c
Date: Tue, 03 Dec 2002 09:45:35 -0500
Message-ID: <23240.1038926735@sss.pgh.pa.us> (raw)
In-Reply-To: <1196.200.225.213.129.1038918944.squirrel@webmail.ad2.com.br>
References: <1398.192.168.1.101.1038854873.squirrel@webmail.aldeiadigital.com.br>
<3DEBFD73.281730C7@tpf.co.jp>
<1196.200.225.213.129.1038918944.squirrel@webmail.ad2.com.br>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: tgl@sss.pgh.pa.us, alepaes@aldeiadigital.com.br
Subject: Re: Datetime and pgtypes.c
In-Reply-To: <23240.1038926735@sss.pgh.pa.us>
References: <1398.192.168.1.101.1038854873.squirrel@webmail.aldeiadigital.com.br> <3DEBFD73.281730C7@tpf.co.jp> <1196.200.225.213.129.1038918944.squirrel@webmail.ad2.com.br> <23240.1038926735@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox