Re: Open 7.3 items

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Sean Chittenden <sean(at)chittenden(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Open 7.3 items
Date: 2002-08-14 15:27:37
Message-ID: 1029338857.19985.5.camel@taru.tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2002-08-14 15:32:11 Re: Inheritance
Previous Message Ross J. Reedstrom 2002-08-14 15:17:58 Re: Inheritance