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

From Kevin Grittner
Subject Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail
Date
Msg-id 4C08F33E0200002500031FBA@gw.wicourts.gov
Whole thread Raw
In response to BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail  ("Farid Zidan" <farid@zidsoft.com>)
Responses Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail  (Farid Zidan <farid@zidsoft.com>)
List pgsql-bugs
>Farid Zidan <farid@zidsoft.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

pgsql-bugs by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail
Next
From: Hartmut Goebel
Date:
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading