Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] problem with numeric

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Ken J(dot) Wright" <ken(at)ori-ind(dot)com>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] problem with numeric
Date: 2000-02-02 14:30:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
> : Why is NUMERIC not considered numeric by TypeCategory()?  Why is DATE not
> : considered a datetime type?  Isn't this routine fundamentally broken?
> : If we need a category it should be taken from a pg_type field, not
> : hardwired in code...
> Thomas, what say you?

Not sure why DATE is not a date/time type. NUMERIC is not included for
two reasons: it is newer than the other code, and I'm not certain
where it should appear in a "promotion heirarchy" due to its

But in general you are right. I did the implementation using hardcoded
info, with the expectation that the eventual "right answer" would
involve allowing the type equivalence *and* type promotion info to be
stored in a table. For one thing, that is the only way afaik to get
user-defined types to participate in this implicit type coersion

But at the time I didn't want to take the leap to defining a new table
or adding a column(s) to pg_type, until the current scheme was in the
field for a while and others had a chance to exercise it and
contribute ideas. 

I was assuming that a new table would be required, rather than using
pg_type, but maybe we only need two columns in a one-to-one
relationship and if so then pg_type might suffice. Are new columns
"typecategory" and "promotiontype" sufficient??

                    - Thomas

Thomas Lockhart				lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

pgsql-interfaces by date

Next:From: Ken J. WrightDate: 2000-02-02 15:50:52
Subject: Re: [INTERFACES] problem with numeric
Previous:From: Peter MountDate: 2000-02-02 11:37:48
Subject: RE: [INTERFACES] jdbc and ie explorer

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group