| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
| Cc: | pgsql-patches <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Re: array_fill function |
| Date: | 2008-07-16 00:49:35 |
| Message-ID: | 200807160049.m6G0nZd08107@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Patch applied, with minor adjustments in error message wording, with
documntation added; committed patch attached.
---------------------------------------------------------------------------
Pavel Stehule wrote:
> 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, skipping... ]
>
> --
> Sent via pgsql-patches mailing list (pgsql-patches(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-patches
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| Attachment | Content-Type | Size |
|---|---|---|
| /rtmp/diff | text/x-diff | 15.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2008-07-16 01:51:25 | Re: variadic function support |
| Previous Message | Tatsuo Ishii | 2008-07-16 00:37:25 | Re: [PATCHES] WITH RECURSIVE updated to CVS TIP |