From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | lockhart(at)fourpalms(dot)org, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Changing column types... |
Date: | 2002-04-05 04:55:42 |
Message-ID: | Pine.LNX.4.21.0204051451460.12721-100000@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 5 Apr 2002, Christopher Kings-Lynne wrote:
> > > 2. Since int4 and abstime are binary compatible (ie
> > int4::abstime works), is
> > > there any serious problem with updating a pg_attribute row for
> > an int4 and
> > > changing it to and abstime? My experiments seem to work.
> >
> > A few integer values are reserved values in abstime, to allow
> > implementation of infinity, -infinity, etc.
>
> Does this mean that hacking the type of an int4 column to become abstime is
> a bad idea?
The only problem with this would be if the int4 column contained the
reserved values:
#define INVALID_ABSTIME ((AbsoluteTime) 0x7FFFFFFE)
#define NOEND_ABSTIME ((AbsoluteTime) 0x7FFFFFFC)
#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN)
>
> Yes in theory - no in practice?
Kind of the other way around, in my opinion: No in theory, yes in
practice.
Gavin
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2002-04-05 06:24:53 | PQescapeBytea is not multibyte aware |
Previous Message | Thomas Lockhart | 2002-04-05 04:40:31 | Re: Changing column types... |