Re: Adding time to DATE type

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding time to DATE type
Date: 2000-10-03 03:43:59
Message-ID: 200010030343.XAA11386@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is this something worth addressing?

> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Bruce Momjian writes:
> >> Can someone give me a TODO summary for this issue?
>
> > * make 'text' constants default to text type (not unknown)
>
> > (I think not everyone's completely convinced on this issue, but I don't
> > recall anyone being firmly opposed to it.)
>
> It would be a mistake to eliminate the distinction between unknown and
> text. See for example my just-posted response to John Cochran on
> pgsql-general about why 'BOULEVARD'::text behaves differently from
> 'BOULEVARD'::char. If string literals are immediately assigned type
> text then we will have serious problems with char(n) fields.
>
> I think it's fine to assign string literals a type of 'unknown'
> initially. What we need to do is add a phase of type resolution that
> considers treating them as text, but only after the existing logic fails
> to deduce a type.
>
> (BTW it might be better to treat string literals as defaulting to char(n)
> instead of text, allowing the normal promotion rules to replace char(n)
> with text if necessary. Not sure if that would make things more or less
> confusing for operations that intermix fixed- and variable-width char
> types.)
>
> regards, tom lane
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-10-03 03:44:56 Re: Patch for 'Not to stuff everything as files in a single directory, hash dirs''
Previous Message Bruce Momjian 2000-10-03 03:43:02 Re: Syslog and pg_options (for RPMs)