Re: Array assignment behavior (was Re: [ADMIN] Stored procedure array limits) - Mailing list pgsql-general

From John D. Burger
Subject Re: Array assignment behavior (was Re: [ADMIN] Stored procedure array limits)
Date
Msg-id CA0C32E2-2371-4297-83AD-2ED9A14E0513@mitre.org
Whole thread Raw
In response to Re: Array assignment behavior (was Re: [ADMIN] Stored procedure array limits)  (Casey Duncan <casey@pandora.com>)
Responses Re: Array assignment behavior (was Re: [ADMIN] Stored procedure array limits)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>> As of 8.2 we could allow assignment to
>> arbitrary positions by filling the intermediate positions with nulls.
>> The code hasn't actually been changed to allow that, but it's
>> something
>> we could consider doing now.
>
> At first blush, this strikes me as a bit too magical/implicit. Are
> there other languages where sequences behave similarly?

 > perl -e '@A = (1, 2, 3); print "@A\n"; $A[10] = 10; print "@A\n";'
1 2 3
1 2 3        10

- John D. Burger
   MITRE


pgsql-general by date:

Previous
From: "John D. Burger"
Date:
Subject: Re: Expected accuracy of planner statistics
Next
From: Dimitri Fontaine
Date:
Subject: Re: benchmark suite