Re: [GENERAL] What's the benefit (or usage scenario) of a "typedtable"? - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: [GENERAL] What's the benefit (or usage scenario) of a "typedtable"?
Date
Msg-id d7181a90-873f-6e07-09a2-e5be1accc135@2ndquadrant.com
Whole thread Raw
In response to [GENERAL] What's the benefit (or usage scenario) of a "typed table"?  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general
On 12/31/16 10:34 AM, Thomas Kellerer wrote:
> I recently stumbled over "typed tables" in Postgres
> (there were several questions containing this on stackoverflow recently)
>
>      create type some_type as (id integer, data text);
>      create table some_table of some_type;
>
> I wonder what the benefit of a typed table is and when this would be useful?

One use is with PL/Proxy.  You create the type on the proxy, thus
allowing you to define functions using the type.  Then create the table
on the backend from the type, thus ensuring they are the same.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] could not load library "$libdir/sslutils": inpg_upgrade process
Next
From: DrakoRod
Date:
Subject: [GENERAL] Re: could not load library "$libdir/sslutils": in pg_upgradeprocess