Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there
Дата
Msg-id CAKFQuwYcV+AZMbyzHyDdxFhp_GH5Nty_GL1U5JkPYJeya0MLYQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there  (Erik Wienhold <ewie@ewie.name>)
Ответы Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there  (Erik Wienhold <ewie@ewie.name>)
Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-hackers
On Thu, Mar 7, 2024 at 9:29 PM Erik Wienhold <ewie@ewie.name> wrote:
I wrote:
> The attached v2 is a simpler patch that instead modifies the existing
> error message.

Forgot to attach v2.


For consideration for the doc portion.  The existing wording is too imprecise for my liking and just tacking on "expects...create type" is jarring.

"""
Creates a typed table, which takes it structure from an existing (name optionally schema-qualified) stand-alone composite type i.e., one created using CREATE TYPE) though it still produces a new composite type as well.  The table will have a dependency to the referenced type such cascaded alter and drop actions on the type will propagate to the table.

A typed table always has the same column names and data types as the type it is derived from, and you cannot specify additional columns.  But the CREATE TABLE command can add defaults and constraints to the table, as well as specify storage parameters.
"""

We do use the term "stand-alone composite" in create type so I'm inclined to use it instead of "composite created with CREATE TYPE"; especially in the error messages; I'm a bit more willing to add the cross-reference to create type in the user docs.

David J.

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: BitmapHeapScan streaming read user and prelim refactoring
Следующее
От: Noah Misch
Дата:
Сообщение: Re: AIX support