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

From Tom Lane
Subject Re: Proposal: new function array_init
Date
Msg-id 24655.1212591404@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: new function array_init  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Responses Re: Proposal: new function array_init  ("Pavel Stehule" <pavel.stehule@gmail.com>)
List pgsql-hackers
"Pavel Stehule" <pavel.stehule@gmail.com> writes:
> I put fill value on end, because it is like default value:

> array_set(array[2,2]);
> array_set(array[2,2], 0);

Huh?  That's completely nonsensical ... where will you determine the
type of the array, if you don't have a sample element?

The fact that the fill value is determining the array type is why
it seems important enough to put first.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Core team statement on replication in PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: Change lock requirements for adding a trigger