From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | array_fill function |
Date: | 2008-06-06 05:06:04 |
Message-ID: | 162867790806052206l7f6aae61ha29f6720c66caa6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Hello
Proposal: http://archives.postgresql.org/pgsql-hackers/2008-06/msg00057.php
I changed name to array_fill and order of arguments.
postgres=# SELECT array_fill(0, ARRAY[2,3]);
array_fill
-------------------
{{0,0,0},{0,0,0}}
(1 row)
postgres=# SELECT array_fill(0, ARRAY[2,3], ARRAY[1,2]);
array_fill
------------------------------
[1:2][2:4]={{0,0,0},{0,0,0}}
(1 row)
postgres=# SELECT array_fill(0, ARRAY[4], ARRAY[2]);
array_fill
-----------------
[2:5]={0,0,0,0}
(1 row)
postgres=# SELECT array_fill(NULL::int, ARRAY[4]);
array_fill
-----------------------
{NULL,NULL,NULL,NULL}
(1 row)
Regards
Pavel Stehule
Attachment | Content-Type | Size |
---|---|---|
array_fill.diff | text/x-patch | 13.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Teodor Sigaev | 2008-06-06 13:54:20 | Re: GIN improvements |
Previous Message | Mario Weilguni | 2008-06-05 13:17:46 | Re: Logging conflicted queries on deadlocks |