Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Farid Zidan" <farid(at)zidsoft(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail
Date: 2010-06-04 17:36:14
Message-ID: 4C08F33E0200002500031FBA@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>Farid Zidan <farid(at)zidsoft(dot)com> wrote:

> can be eliminated by appropriately handling the distinct keyword
> and does not have to occur.

Based on previous discussions around our approaching data types, I
don't think any of the regular PostgreSQL developers are likely to
agree with you; but if you see a way to make it work, feel free to
submit a patch. See this page for the process:

http://wiki.postgresql.org/wiki/Submitting_a_Patch

> The ISO-datetime string literal format I am using the most
> general/standard for datetime/timestamp and is not the issue here.

The format in your string literal is the portable one; however, a
timestamp literal requires the TIMESTAMP keyword ahead of the string
literal, which you have chosen to omit. Did you try the query with
a proper timestamp literal, as I suggested, against all these
databases? If using standard syntax works, why not use it?

> The 'distinct' keyword is causing the error.

No, non-standard syntax is causing the error in the case of
DISTINCT, because our extension to the standard does not cover that
case, even though it covers the other. There are good reasons for
that, which you'll probably discover in short order if you work on a
patch for the issue.

-Kevin

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Farid Zidan 2010-06-04 18:18:43 Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail
Previous Message Farid Zidan 2010-06-04 17:09:14 Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail