Skip site navigation (1) Skip section navigation (2)

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 20:22:11
Message-ID: (view raw, whole thread or download thread mbox)
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:
>> 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?

it is nonsens in current postgres. But null array is castable to anyarray no?

> The fact that the fill value is determining the array type is why
> it seems important enough to put first.
I agree - first is most important parameter. But I am not sure, that
is it. size or value. An I am strong fixed on C, Intel notation where
destination is first and  value is second.

>                        regards, tom lane

In response to


pgsql-hackers by date

Next:From: Simon RiggsDate: 2008-06-04 20:28:08
Subject: Re: Change lock requirements for adding a trigger
Previous:From: Tom LaneDate: 2008-06-04 20:12:05
Subject: Re: Overhauling GUCS

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group