Re: Concatenating strings within a function definition

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nishad(at)ptolemy(dot)tlg(dot)uci(dot)edu
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Concatenating strings within a function definition
Date: 2004-11-04 19:32:42
Message-ID: 28187.1099596762@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Nishad Prakash <prakashn(at)uci(dot)edu> writes:
> I'm trying to create a function like so:

> create function get_lid_prefix (text) returns setof int as
> 'select lid from ilemma where lemma ~ \'^\' + upper($1)'
> language 'sql';

'select lid from ilemma where lemma ~ (\'^\' || upper($1))'

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jaime Casanova 2004-11-04 19:37:14 a bug in plpgsql
Previous Message Nishad Prakash 2004-11-04 19:18:56 Concatenating strings within a function definition