Re: Proposal: new function array_init

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Decibel! <decibel(at)decibel(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: new function array_init
Date: 2008-06-04 21:23:08
Message-ID: 162867790806041423m7199ece0ocb42e81a2b10d517@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2008/6/4 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2008/6/4 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>> If you mean an array of nulls, it still has to have an element type.
>
>> I know it - but there was discus about untyped array for empty arrays
>> like ARRAY[]
>
> What's that have to do with array_init? It will not (usually) be trying
> to create an empty array.
>

sparse arrays?? Or it emulation in pg

idealized code:

a = array_set(array[10,10]); // untyped null array
a[10,10] = 'text'; -- now array is typed

without
a = array_set(NULL::text, array[10,10]);
a[10,10] = 'text';

this is only some ideas, I don't plan do it

Pavel

> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-06-04 21:34:48 Re: Proposal: new function array_init
Previous Message Steve Atkins 2008-06-04 21:10:26 Re: Overhauling GUCS