pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Lockhart <lockhart@alumni.caltech.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ken J. Wright <ken@ori-ind.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] problem with numeric
Date: Wed, 02 Feb 2000 14:30:18 +0000
Message-ID: <38983F7A.5A115B84@alumni.caltech.edu> (raw)
References: <3.0.1.32.20000201095714.00b16440@ori-ind.com>
	<16963.949464917@sss.pgh.pa.us>

> : 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
performance.

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
scheme.

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@alumni.caltech.edu
South Pasadena, California



view thread (7+ messages)  latest in thread

Message-ID: <38983F7A.5A115B84@alumni.caltech.edu>
Permalink:  ../38983F7A.5A115B84@alumni.caltech.edu/
Also on:    postgresql.org/message-id/38983F7A.5A115B84@alumni.caltech.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: lockhart@alumni.caltech.edu, tgl@sss.pgh.pa.us, ken@ori-ind.com
  Subject: Re: [INTERFACES] problem with numeric
  In-Reply-To: <38983F7A.5A115B84@alumni.caltech.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox