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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [GENERAL] What's the benefit (or usage scenario) of a "typedtable"?
Дата
Msg-id d7181a90-873f-6e07-09a2-e5be1accc135@2ndquadrant.com
обсуждение исходный текст
Ответ на [GENERAL] What's the benefit (or usage scenario) of a "typed table"?  (Thomas Kellerer <spam_eater@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] could not load library "$libdir/sslutils": inpg_upgrade process
Следующее
От: DrakoRod
Дата:
Сообщение: [GENERAL] Re: could not load library "$libdir/sslutils": in pg_upgradeprocess