Re: Re: Bug in user-defined types?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lockhart(at)fourpalms(dot)org
Cc: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>, Postgresql <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: Bug in user-defined types?
Date: 2001-04-03 14:45:45
Message-ID: 2826.986309145@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:
> If we made the scanner aware of integers larger than int4, we would have
> to choose between int8 (not supported on all platforms, but mostly OK)
> and numeric, which is markedly slower to process and handle. I recall
> that Tom Lane had the proposal to use a more loosely categorized "some
> kind of numeric type" in the scanner, postponing the hard assignment of
> type to later in the parser. That might get around the performance
> issues, since numeric would only be used if the context required it.

Yes, I was thinking of treating numerical literals more like we already
treat unknown-type string literals: keep the value in string format
until we deduce from context which type it should be, then convert.
Internally this already happens for literals that don't fit in int4,
but we still prejudge the type sooner than I think we should.

IIRC, the main reason this isn't done yet was that we hadn't come to
a conclusion about the appropriate type promotion hierarchy for
numeric values.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2001-04-03 15:31:25 Final call for platform testing
Previous Message Thomas Lockhart 2001-04-03 14:32:26 Re: Bug in user-defined types?