--- Guy Fraser <[EMAIL PROTECTED]> wrote:
> On Fri, 2005-23-09 at 09:48 -0700, Matthew Peter
> wrote:
> >
> > --- Guy Fraser <[EMAIL PROTECTED]> wrote:
> >
> ...snip...
> > > OK what I jotted down was totally wrong.
> > >
> > > This is slightly more correct :
> > >
> > > SELECT
> > > array_up
On Fri, 2005-23-09 at 09:48 -0700, Matthew Peter wrote:
>
> --- Guy Fraser <[EMAIL PROTECTED]> wrote:
>
...snip...
> > OK what I jotted down was totally wrong.
> >
> > This is slightly more correct :
> >
> > SELECT
> > array_upper(item,1) - array_lower(item,1) + 1 as
> > elements
> > FROM
> >
--- Guy Fraser <[EMAIL PROTECTED]> wrote:
> On Thu, 2005-22-09 at 21:52 -0500, Bruno Wolff III
> wrote:
> > On Thu, Sep 22, 2005 at 14:16:48 -0600,
> > Guy Fraser <[EMAIL PROTECTED]> wrote:
> > > On Thu, 2005-22-09 at 12:43 -0400, Greg Stark
> wrote:
> > > > Guy Fraser <[EMAIL PROTECTED]> writ
On Thu, 2005-22-09 at 21:52 -0500, Bruno Wolff III wrote:
> On Thu, Sep 22, 2005 at 14:16:48 -0600,
> Guy Fraser <[EMAIL PROTECTED]> wrote:
> > On Thu, 2005-22-09 at 12:43 -0400, Greg Stark wrote:
> > > Guy Fraser <[EMAIL PROTECTED]> writes:
> > >
> > > > So to answer his question he would likel
On Thu, Sep 22, 2005 at 14:16:48 -0600,
Guy Fraser <[EMAIL PROTECTED]> wrote:
> On Thu, 2005-22-09 at 12:43 -0400, Greg Stark wrote:
> > Guy Fraser <[EMAIL PROTECTED]> writes:
> >
> > > So to answer his question he would likely want :
> > >
> > > SELECT
> > > array_upper(item,1) - array_upper(
On Thu, 2005-22-09 at 12:43 -0400, Greg Stark wrote:
> Guy Fraser <[EMAIL PROTECTED]> writes:
>
> > So to answer his question he would likely want :
> >
> > SELECT
> > array_upper(item,1) - array_upper(item,0) + 1 as elements
> > FROM
> > arraytest ;
>
> Note that this doesn't work for empty a
Guy Fraser <[EMAIL PROTECTED]> writes:
> So to answer his question he would likely want :
>
> SELECT
> array_upper(item,1) - array_upper(item,0) + 1 as elements
> FROM
> arraytest ;
Note that this doesn't work for empty arrays.
It will return NULL instead of 0.
--
greg
--
On Wed, 2005-21-09 at 07:48 -0700, Tony Wasson wrote:
> On 9/20/05, Matthew Peter <[EMAIL PROTECTED]> wrote:
> > Wondering if there's a way for postgres to return how
> > many elements are in a array as a single integer? For
> > instance, returning 10 (items in array) instead of
> > [-5:4]
> >
> >
On 9/20/05, Matthew Peter <[EMAIL PROTECTED]> wrote:
> Wondering if there's a way for postgres to return how
> many elements are in a array as a single integer? For
> instance, returning 10 (items in array) instead of
> [-5:4]
>
> Also, is there a way to return the position of an item
> in a array?
Wondering if there's a way for postgres to return how
many elements are in a array as a single integer? For
instance, returning 10 (items in array) instead of
[-5:4]
Also, is there a way to return the position of an item
in a array?
__
Yahoo! Ma
10 matches
Mail list logo