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@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden