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

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 )




view thread (5+ messages)  latest in thread

Message-ID: <hienfk$8da$2@reversiblemaps.ath.cx>
Permalink:  ../hienfk$8da$2@reversiblemaps.ath.cx/
Also on:    postgresql.org/message-id/hienfk$8da$2@reversiblemaps.ath.cx

 · 

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: jasen@xnet.co.nz
  Subject: Re: problem using regexp_replace
  In-Reply-To: <hienfk$8da$2@reversiblemaps.ath.cx>

* 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