Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there
От | Erik Wienhold |
---|---|
Тема | Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there |
Дата | |
Msg-id | 73jtqglviqor5ozqrthjmau7nj4xi7z4obzaqflf7cvliaf4em@4obr7wqlqkye обсуждение исходный текст |
Ответ на | Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there
|
Список | pgsql-hackers |
On 2024-03-29 02:42 +0100, David G. Johnston wrote: > 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. > """ Thanks, that sounds better. I incorporated that with some minor edits in the attached v3. > 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. Okay, changed in v3 as well. I used "created with CREATE TYPE" in the error message because I thought it's clearer to the user. But I see no reason for not using "stand-alone" here as well if it's the established term. -- Erik
Вложения
В списке pgsql-hackers по дате отправления: