Re: Open 7.3 items
Hannu Krosing <hannu@tm.ee>
From: Hannu Krosing <hannu@tm.ee>
To: Joe Conway <mail@joeconway.com>
Cc: Sean Chittenden <sean@chittenden.org>, Bruce Momjian <pgman@candle.pha.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2002-08-14T15:27:37Z
Lists: pgsql-hackers
On Wed, 2002-08-14 at 16:08, Joe Conway wrote: > I already have a function in contrib/dblink, currently called > dblink_strtok(), which I was going to turn into a builtin function per > recent discussion (renamed of course). It would work for this but is > more general: > > dblink_strtok(text inputstring, text delimiter, int posn) RETURNS text > > Inputs > inputstring > any string you want to parse a token out of; > e.g. 'f=1&g=3&h=4' > delimiter > a single character to use as the delimiter; > e.g. '&' or '=' > posn > the position of the token of interest, 0 based; > e.g. 1 > > Should it be called splitstr() (similar to substr())? What about functions 1. split(text,text,int) returns text 2. split(text,text) returns text[] and why not 3. split(text,text,text) returns text which returns text from $1 delimited by $2 and $3 ------------- Hannu