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

2017-01-03 Thread Peter Eisentraut
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

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

2016-12-31 Thread Adrian Klaver
On 12/31/2016 08:25 AM, Thomas Kellerer wrote: David G. Johnston schrieb am 31.12.2016 um 16:51: I wonder what the benefit of a typed table is and when this would be useful? But I'd say if you want a table with said structure you should plan on droppign the original type after you've altered

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

2016-12-31 Thread Tom Lane
Thomas Kellerer 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

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

2016-12-31 Thread Thomas Kellerer
David G. Johnston schrieb am 31.12.2016 um 16:51: I wonder what the benefit of a typed table is and when this would be useful? But I'd say if you want a table with said structure you should plan on droppign the original type after you've altered all references to it to point to the new

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

2016-12-31 Thread David G. Johnston
On Saturday, December 31, 2016, 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

[GENERAL] What's the benefit (or usage scenario) of a "typed table"?

2016-12-31 Thread Thomas Kellerer
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