Re: [GENERAL] CREATE TABLE & composite type - Mailing list pgsql-general

From Adrian Klaver
Subject Re: [GENERAL] CREATE TABLE & composite type
Date
Msg-id 605ba0a0-e447-fca2-3065-bad12141bd86@aklaver.com
Whole thread Raw
In response to Re: [GENERAL] CREATE TABLE & composite type  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
On 06/28/2017 06:52 AM, Merlin Moncure wrote:
> On Wed, Jun 28, 2017 at 8:37 AM, Adrian Klaver
> <adrian.klaver@aklaver.com> wrote:
>> On 06/28/2017 06:27 AM, gmb wrote:
>>>

>> CREATE TABLE inventory_item_table AS ( SELECT some_func( ) limit 0);
>
> I think it's better to use the (somewhat arcane but designed for this
> exact purpose) 'OF' syntax (hat tip to Peter E).  This is particularly
> useful if you want to have multiple tables mirror the composite type
> and manage the definition through the rowtype:

Wow, did not know that existed. Thanks.



--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Which process is actually doing the WAL writes/callsXLogFlush?
Next
From: gmb
Date:
Subject: Re: [GENERAL] CREATE TABLE & composite type