Re: What's the benefit (or usage scenario) of a "typed table"?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What's the benefit (or usage scenario) of a "typed table"?
Date: 2016-12-31 16:46:09
Message-ID: 32103.1483202769@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thomas Kellerer <spam_eater(at)gmx(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-12-31 16:54:39 Re: What's the benefit (or usage scenario) of a "typed table"?
Previous Message Thomas Kellerer 2016-12-31 16:25:54 Re: What's the benefit (or usage scenario) of a "typed table"?