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

From Tom Lane
Subject Re: [GENERAL] What's the benefit (or usage scenario) of a "typed table"?
Date
Msg-id 32103.1483202769@sss.pgh.pa.us
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
Thomas Kellerer <spam_eater@gmx.net> writes:
> 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?

AFAIK we implemented that only because it's in the SQL standard.
Otherwise you might as well use, for instance, CREATE TABLE ... LIKE.

            regards, tom lane


pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: [GENERAL] What's the benefit (or usage scenario) of a "typed table"?
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] What's the benefit (or usage scenario) of a "typedtable"?