Re: How to concatenate a boolean to a text string for an EXECUTE stmt in a stored proc

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Keaton Adams <kadams(at)mxlogic(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to concatenate a boolean to a text string for an EXECUTE stmt in a stored proc
Date: 2008-03-23 14:51:21
Message-ID: 20080323145121.GA26201@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message srdjan 2008-03-23 15:30:22 INFINITE RECURSION with rules...
Previous Message Inoqulath 2008-03-23 12:36:36 Re: Installing on Windows without using msi Installer