Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AC8E2475D99 for ; Tue, 3 Dec 2002 09:45:41 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 57DBA4760DC for ; Tue, 3 Dec 2002 09:45:38 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id gB3EjZpd023241; Tue, 3 Dec 2002 09:45:36 -0500 (EST) To: "alexandre :: aldeia digital" Cc: pgsql-odbc@postgresql.org Subject: Re: Datetime and pgtypes.c 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> Comments: In-reply-to "alexandre :: aldeia digital" message dated "Tue, 03 Dec 2002 10:35:44 -0200" Date: Tue, 03 Dec 2002 09:45:35 -0500 Message-ID: <23240.1038926735@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/18 X-Sequence-Number: 2407 "alexandre :: aldeia digital" 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