Re: Concatenating String Literals in pgsql - Mailing list pgsql-general

From Tom Lane
Subject Re: Concatenating String Literals in pgsql
Date
Msg-id 2212.1060611968@sss.pgh.pa.us
Whole thread Raw
In response to Concatenating String Literals in pgsql  (Raymond <support@bigriverinfotech.com>)
List pgsql-general
Raymond <support@bigriverinfotech.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.4Beta1 "failed to create socket: Address family not supported by protocol"
Next
From: Tom Lane
Date:
Subject: Re: public key functions for postgresql ?