Re: REFERENCES error message complaint, suggestion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: REFERENCES error message complaint, suggestion
Дата
Msg-id 7120.1078499547@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: REFERENCES error message complaint, suggestion  (Enrico Weigelt <weigelt@metux.de>)
Ответы Re: REFERENCES error message complaint, suggestion  ("Rod K" <rod@23net.net>)
Список pgsql-general
Enrico Weigelt <weigelt@metux.de> writes:
> * Tom Lane <tgl@sss.pgh.pa.us> [2004-03-04 11:24:11 -0500]:
>> Double quotes are for names (identifiers).  Single quotes are
>> for string literals (constants).

> BTW: is this general SQL syntax or just PostgeSQL ?

This is SQL92 standard behavior.  Relevant extracts from the standard:

         <delimited identifier> ::=
              <double quote> <delimited identifier body> <double quote>

         <character string literal> ::=
              [ <introducer><character set specification> ]
              <quote> [ <character representation>... ] <quote>
                [ { <separator>... <quote> [ <character representation>... ] <quote> }... ]

         <double quote> ::= "

         <quote> ::= '

> mysql does no distinction (which is IMHO very unclean),

How can they have no distinction?  Suppose I write

    select 'col' from tab;
    select "col" from tab;

If there is a column tab.col, what am I going to get in each case?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: relocatable binary distribution
Следующее
От: "Rod K"
Дата:
Сообщение: Re: REFERENCES error message complaint, suggestion