From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] pg_type questions |
Date: | 1999-10-17 20:29:50 |
Message-ID: | Pine.LNX.4.10.9910172224310.366-100000@peter-e.yi.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Oct 17, Tom Lane mentioned:
> For the standard system types like int4, text, etc, it's probably OK
> for client code to assume that particular numeric OIDs correspond to
> those types --- use the #defines that are in catalog/pg_type.h, such as
> BOOLOID, to refer to those types. (I think there are one or two places
> in libpq and/or psql that do this already, eg, to decide whether a
> column is "numeric".) The backend does this all over the place, but
> it's a little shakier for frontend code to do it, because a frontend
> might possibly be used with other database versions than the one it was
> compiled for. Still, I think you could get away with it for standard
> types --- AFAIK no one has any intention of renumbering those.
>
> (Thomas has been muttering dire things about the date/time types, so
> you might be well advised not to assume anything about those ;-).)
The previous alignment "algorithm" in psql in essence checked for
[^-+0-9\.eE] or sth like that as far as I could tell.
Right now I am just aligning int[248], float[48], and numeric but the
date/time types might be nice as well. But the idea was to straighten this
out a bit so that alignment for other datatypes could easily be added or
removed. I think I might have accomplished that ;)
-Peter
--
Peter Eisentraut Sernanders vaeg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Péder | 1999-10-17 20:56:45 | insertable views - not copy-able ? |
Previous Message | Peter Eisentraut | 1999-10-17 20:24:13 | Re: ORACLE COMMENT statement |