Re: Concatenating String Literals in pgsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Raymond <support(at)bigriverinfotech(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Concatenating String Literals in pgsql
Date: 2003-08-11 14:26:08
Message-ID: 2212.1060611968@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Raymond <support(at)bigriverinfotech(dot)com> writes:
> The compiler complains about the concat operator in the following code
> fragment:

> RAISE EXCEPTION
> ''SELECT DISTINCT "t1"."usesysid" '' ||
> ''INTO userID '' ||

RAISE EXCEPTION doesn't support expressions in its arguments, IIRC.
The format has to be a simple string literal, and anything to be plugged
into it has to be a variable reference.

So, do the concatenation beforehand.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2003-08-11 14:30:41 Re: Tsearch limitations
Previous Message Tom Lane 2003-08-11 14:21:43 Re: 7.4Beta1 "failed to create socket: Address family not supported by protocol"