Re: How to concatenate a boolean to a text string for an EXECUTE stmt in a stored proc - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: How to concatenate a boolean to a text string for an EXECUTE stmt in a stored proc
Date
Msg-id 20080323145121.GA26201@svana.org
Whole thread Raw
In response to How to concatenate a boolean to a text string for an EXECUTE stmt in a stored proc  (Keaton Adams <kadams@mxlogic.com>)
List pgsql-general
On Wed, Mar 19, 2008 at 02:28:33PM -0600, Keaton Adams wrote:
>
> Postgres 8.1 on RHEL
>
> How do I formulate this EXECUTE statement so that cust_hold (boolean column
> in the table) can be set to the value in v_cust_on_hold (boolean variable in
> a function)?

You're looking for quote_literal(), see the documentation:
http://www.postgresql.org/docs/8.3/interactive/plpgsql-statements.html
Section 35.8.4.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Attachment

pgsql-general by date:

Previous
From: chuckee
Date:
Subject: table size and storage location
Next
From: Steve Clark
Date:
Subject: Re: --enable-thread-safety bug