pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: gherzig@fmed.uba.ar
To: Jasen Betts <jasen@xnet.co.nz>
Cc: pgsql-sql@postgresql.org
Subject: Re: problem using regexp_replace
Date: Mon, 11 Jan 2010 08:33:33 -0200 (ARST)
Message-ID: <4b9e9f07701f20f59fa63e18f73cb311.squirrel@www.webmail.fmed.uba.ar> (raw)
In-Reply-To: <hienfk$8da$2@reversiblemaps.ath.cx>
References: <6f55ccf2a59fe7bca287389ec92e5f91.squirrel@www.webmail.fmed.uba.ar>
	<hienfk$8da$2@reversiblemaps.ath.cx>

> On 2010-01-11, gherzig@fmed.uba.ar <gherzig@fmed.uba.ar> wrote:
>
>> CREATE FUNCTION valores_sustitucion(valor_ingresado varchar[])
>> returns varchar
>> as
>> $$
>> select case
>>   $1[1] when 'Action_1' then
>>     (select descripcion from load_by_cod($1[2]))
>>
>>    when 'Action_2' then (select descripcion from pay_by_view($1[2])
>>
>>  else 'FALSE'
>> end;
>> $$ language sql;
>
>> Anybody has a hint?
>
> you are missing a )
>

Oh, thats a copy-paste problem, sory about that.
I forgot to mention, this is a 8.3 running on linux.

Gerardo




view thread (5+ messages)  latest in thread

Message-ID: <4b9e9f07701f20f59fa63e18f73cb311.squirrel@www.webmail.fmed.uba.ar>
Permalink:  ../4b9e9f07701f20f59fa63e18f73cb311.squirrel@www.webmail.fmed.uba.ar/
Also on:    postgresql.org/message-id/4b9e9f07701f20f59fa63e18f73cb311.squirrel@www.webmail.fmed.uba.ar

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gherzig@fmed.uba.ar, jasen@xnet.co.nz
  Subject: Re: problem using regexp_replace
  In-Reply-To: <4b9e9f07701f20f59fa63e18f73cb311.squirrel@www.webmail.fmed.uba.ar>

* 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