Re: BUG #5490: INSERT doesn't force cast from text to timestamp

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andy Balholm <andy(at)balholm(dot)com>
Cc: Postgres-Bugs <pgsql-bugs(at)postgresql(dot)org>, craig(at)postnewspapers(dot)com(dot)au, farid(at)zidsoft(dot)com, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Subject: Re: BUG #5490: INSERT doesn't force cast from text to timestamp
Date: 2010-06-07 14:53:17
Message-ID: 16020.1275922397@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andy Balholm <andy(at)balholm(dot)com> writes:
> Is there a way to make values of "undefined" type pass through the
> SELECT DISTINCT filter (getting checked for uniqueness) but remain
> "undefined"

No. What is your criterion for deciding that two values are distinct?
It's not possible to do that without imputing a data type to them.
(In particular, comparing the character strings amounts to deciding
that they are of a textual data type --- failing to acknowledge that
isn't a workaround but merely sloppy thinking.)

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Dunstan 2010-06-07 14:54:38 Re: [HACKERS] Invalid YAML output from EXPLAIN
Previous Message Robert Haas 2010-06-07 14:52:45 Re: BUG #5490: INSERT doesn't force cast from text to timestamp