pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: David G. Johnston <david.g.johnston@gmail.com>
To: Erik Wienhold <ewie@ewie.name>
Cc: Hannu Krosing <hannuk@google.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there
Date: Wed, 17 Apr 2024 14:53:40 +0200
Message-ID: <59ea426c-e31b-4b88-b970-eda808af9cc0@eisentraut.org> (raw)
In-Reply-To: <CAKFQuwYcV+AZMbyzHyDdxFhp_GH5Nty_GL1U5JkPYJeya0MLYQ@mail.gmail.com>
References: <CAMT0RQRysCb_Amy5CTENSc5GfsvXL1a4qX3mv_hx31_v74P==g@mail.gmail.com>
	<iafzaljqlx6bjbbhllavwgkg45lfj2mssm4xbazxezhpiitofe@k4g4fzcr6g2n>
	<nb4cfr26yhqfdirpkuwqxiaalfgloceuhfnmyor7w2pwgud5wl@c3mb7yd6uz4q>
	<itvvmotar2z565azdxbtsc7ajpymer6xmqc7tzifzw4zuxnxo6@puia7azj3x5c>
	<CAKFQuwYcV+AZMbyzHyDdxFhp_GH5Nty_GL1U5JkPYJeya0MLYQ@mail.gmail.com>

On 29.03.24 02:42, David G. Johnston wrote:
> 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.

I'm not sure this would have helped.  If you see this in the error 
message, then there is no additional guidance what a "stand-alone 
composite type" and a not-"stand-alone composite type" are.

Maybe it's possible to catch the forbidden cases more explicitly and 
come up with more helpful error messages along the lines of "cannot 
create a typed table based on the row type of another table".






view thread (17+ messages)  latest in thread

Message-ID: <59ea426c-e31b-4b88-b970-eda808af9cc0@eisentraut.org>
Permalink:  ../59ea426c-e31b-4b88-b970-eda808af9cc0@eisentraut.org/
Also on:    postgresql.org/message-id/59ea426c-e31b-4b88-b970-eda808af9cc0@eisentraut.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter@eisentraut.org, david.g.johnston@gmail.com, ewie@ewie.name, hannuk@google.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there
  In-Reply-To: <59ea426c-e31b-4b88-b970-eda808af9cc0@eisentraut.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox