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

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail
Дата
Msg-id 4C08E8F10200002500031FAD@gw.wicourts.gov
обсуждение исходный текст
Ответ на BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail  ("Farid Zidan" <farid@zidsoft.com>)
Ответы Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail
Список pgsql-bugs
>Farid Zidan <farid@zidsoft.com> wrote:

>> If we were strictly complying with the SQL standard,

> Considering the statement works in all the 9 DBMS systems+ that I
> have tested so far as mentioned above, I would say PostgreSQL is
> not compliant with SQL standard in this regard.

The SQL standard is a document published by the International
Standards Organization (ISO) and also adopted by the American
National Standards Institute (ANSI).  Those documents don't require
a query in either of the forms you presented to work.  Because of
the convenience factor, most database products have non-standard
extensions to omit type specification in some places.  PostgreSQL's
extensions are oriented more toward user-installable data types
(such as geometric shapes or global coordinates), so the particulars
of our non-standard extensions differ so that use of those features
is as easy as practicable.  That does result in some non-standard
extensions which work in other products not working in PostgreSQL.

I think you'll find that the syntax I suggested (using the standard
timestamp literal instead of a bare character string literal) will
work in all of the databases you mentioned; if you want portable
code, it is best to follow the standard rather than some inferred
popular convention.

I hope this helps.

-Kevin

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail