[Fwd: plpgsql and booleans?]

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [Fwd: plpgsql and booleans?]
Date: 2004-01-20 06:28:20
Message-ID: 400CCA84.1050602@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi guys,

When writing a PL/pgSQL trigger function how do you handle the case :

EXECUTE ''UPDATE test_table SET test_col '' ||
quote_literal(NEW.test_col2) || '';'';

where test_col and test_col2 are boolean fields?

The case above gives :
ERROR: function quote_literal(boolean) does not exist

And without the quote_literal() gives :
ERROR: operator does not exist: text || boolean

Is there supposed to be a quote_literal() for booleans?

Chris

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brian Moore 2004-01-20 06:33:42 Allow backend to output result sets in XML
Previous Message David Garamond 2004-01-20 06:20:31 Re: What's planned for 7.5?