Re: Typed tables

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Andrew Chernow <ac(at)esilo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Typed tables
Date: 2010-01-12 09:34:54
Message-ID: 162867791001120134g2e9cd3cxf6de55e1b51fa545@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/1/12 Peter Eisentraut <peter_e(at)gmx(dot)net>:
> On mån, 2010-01-11 at 19:27 -0500, Andrew Chernow wrote:
>> Peter Eisentraut wrote:
>> > On mån, 2010-01-11 at 15:02 -0500, Andrew Chernow wrote:
>> >> ISTM that the ultimate would be a 'create table (...._) without storage'
>> >> (or some'm) and make 'create type' an alternate syntax for SQL
>> >> conformance.
>> >
>> > I don't really understand the purpose of that.
>> >
>>
>> What is the point of CREATE TYPE name AS () syntax?  Why would one use create
>> type when there is create table?  Does it provide additional functionality I am
>> unaware of or does it exist for comformance reasons?
>
> Well, that is a very deep question. ;-)  I suppose a concise answer
> would be that types are for passing data around between functions, and
> tables are for storing data on disk.

it should help only for "small" tables. It's looks well, but it can be
very slow and very memory expensive for bigger tables. I thing, we
need some QUERY->cursor translation mechanism. Memory based solution
(with arrays) is better than nothing, but it cannot be for all.

Pavel

>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Takahiro Itagaki 2010-01-12 09:38:00 Re: plpgsql: open for execute - add USING clause
Previous Message Magnus Hagander 2010-01-12 09:33:46 Re: mailing list archiver chewing patches