pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erwin Brandstetter <Brsaz@gmzx.at>
To: pgsql-admin@postgresql.org
Subject: Re: Return last value in of array (PostgreSQL 7.2.1)
Date: Mon, 29 Sep 2003 14:03:40 -0500
Message-ID: <Xns9405D60CE839DBrandstetterFalterat@213.129.232.14> (raw)
References: <Xns93FEE319E24A4BrandstetterFalterat@213.129.232.14>
	<200309231746.13757.scrawford@pinpointresearch.com>
	<Xns9405C03DEB563BrandstetterFalterat@213.129.232.14>

Not that it makes much of a difference, but i guess the following code 
might work slightly better:

r[(substring(array_dims(r), strpos(array_dims(r), ':') + 1, 
(length(array_dims(r)) - strpos(array_dims(r), ':')) - 1))::int]


Regards
Erwin Brandstetter
-- 
no z in my mail.



view thread (6+ messages)  latest in thread

Message-ID: <Xns9405D60CE839DBrandstetterFalterat@213.129.232.14>
Permalink:  ../Xns9405D60CE839DBrandstetterFalterat@213.129.232.14/
Also on:    postgresql.org/message-id/Xns9405D60CE839DBrandstetterFalterat@213.129.232.14

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Brsaz@gmzx.at
  Subject: Re: Return last value in of array (PostgreSQL 7.2.1)
  In-Reply-To: <Xns9405D60CE839DBrandstetterFalterat@213.129.232.14>
  References: <Xns93FEE319E24A4BrandstetterFalterat@213.129.232.14> <200309231746.13757.scrawford@pinpointresearch.com> <Xns9405C03DEB563BrandstetterFalterat@213.129.232.14> <Xns9405D60CE839DBrandstetterFalterat@213.129.232.14>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox