Re: Proposal: new function array_init - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Proposal: new function array_init
Date
Msg-id 162867790806041423m7199ece0ocb42e81a2b10d517@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: new function array_init  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposal: new function array_init  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
2008/6/4 Tom Lane <tgl@sss.pgh.pa.us>:
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
>> 2008/6/4 Tom Lane <tgl@sss.pgh.pa.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
>


pgsql-hackers by date:

Previous
From: Steve Atkins
Date:
Subject: Re: Overhauling GUCS
Next
From: Tom Lane
Date:
Subject: Re: Proposal: new function array_init