From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | gmb <gmbouwer(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: CREATE TABLE & composite type |
Date: | 2017-06-28 14:08:18 |
Message-ID: | 605ba0a0-e447-fca2-3065-bad12141bd86@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 06/28/2017 06:52 AM, Merlin Moncure wrote:
> On Wed, Jun 28, 2017 at 8:37 AM, Adrian Klaver
> <adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | gmb | 2017-06-28 14:28:05 | Re: CREATE TABLE & composite type |
Previous Message | Adrian Klaver | 2017-06-28 14:00:13 | Re: Which process is actually doing the WAL writes/calls XLogFlush? |