Re: using arrays as variable, not as field

From: "Fernando Papa" <fpapa(at)claxson(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: using arrays as variable, not as field
Date: 2003-03-20 17:41:03
Message-ID: F1DC5B511E2D1C499E5E20FC6D74160D01D6D6FB@exch2000.buehuergo.corp.claxson.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Ooops... thanks a lot Tom!!!

Maybe I need to read againt some chapters...

--
Fernando O. Papa
DBA

> -----Mensaje original-----
> De: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Enviado el: jueves, 20 de marzo de 2003 13:57
> Para: Fernando Papa
> CC: pgsql-general
> Asunto: Re: [GENERAL] using arrays as variable, not as field
>
>
> "Fernando Papa" <fpapa(at)claxson(dot)com> writes:
> > These doc say you can use array_dims to get the dimension
> of an array.
> > But when I try to do some this select array_dims('{1,2,3,4,5}');
> > I get this message:
> > ERROR: Cannot accept a constant of type ANYARRAY
>
> That's not an array, it's just an untyped string. This works:
>
> regression=# select array_dims('{1,2,3,4,5}'::int[]); array_dims
> ------------
> [1:5]
> (1 row)
>
>
> regards, tom lane
>

Browse pgsql-general by date

  From Date Subject
Next Message Darren Ferguson 2003-03-20 18:34:13 Re: Extracting time from timestamp
Previous Message Reid Thompson 2003-03-20 17:03:48 Re: Handling Blobs with libpq