| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера