Why can I create a table named " " ?

Поиск
Список
Период
Сортировка
От Arjen van der Meijden
Тема Why can I create a table named " " ?
Дата
Msg-id 000701c3add0$bf6620d0$3ac15e91@acm
обсуждение исходный текст
Ответ на Debian packages of 7.4  (Oliver Elphick <olly@lfix.co.uk>)
Ответы Re: Why can I create a table named " " ?
Список pgsql-general
Hi,

A colleague and I noticed that MySQL allows this:
CREATE TABLE ` ` ( ` ` INT NOT NULL );

A table with a space as its name and a space as a column name.
We were quite surprised by that and we tested it on postgresql at once
to see whether it was the only one to do so.

Now we were even more surprised that postgresql allows this aswell:
kb=# CREATE TABLE " " (" " int not null);
CREATE TABLE
kb=# \d " "
       Table "public. "
 Column |  Type   | Modifiers
--------+---------+-----------
        | integer | not null

Is this per spec, a bug or intended behaviour?

Best regards,

Arjen van der Meijden




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

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Debian packages of 7.4
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Why can I create a table named " " ?