Re: Why forbid "INSERT INTO t () VALUES ();"

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: Why forbid "INSERT INTO t () VALUES ();"
Дата
Msg-id alpine.DEB.2.22.394.2006262216500.3589538@pseudo
обсуждение исходный текст
Ответ на Re: Why forbid "INSERT INTO t () VALUES ();"  (Isaac Morland <isaac.morland@gmail.com>)
Список pgsql-hackers
Hello Isaac,

> This is not the only area where empty tuples are not supported. Consider:
>
> PRIMARY KEY ()
>
> This should mean the table may only contain a single row, but is not
> supported.

Yep. This is exactly the kind of case about which I was trying the 
command, after reading Bruce Momjian blog 
(https://momjian.us/main/blogs/pgblog/2020.html#June_22_2020) about 
one-row tables and thinking about how to improve it and allow enforcing a 
singleton simply, which is a thing I needed several times in the past.

> On the plus side, empty rows are supported, although the explicit ROW
> keyword is required.

Yet another weirdness.

Thanks for the comments.

-- 
Fabien.



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: PG 13 release notes, first draft
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk