Search Postgresql Archives

Re: CREATE TABLE & composite type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/28/2017 06:52 AM, Merlin Moncure wrote:
On Wed, Jun 28, 2017 at 8:37 AM, Adrian Klaver
<adrian.klaver@xxxxxxxxxxx> 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@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux