[HACKERS] [Fwd: plpgsql and booleans?]

2004-01-19 Thread Christopher Kings-Lynne
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 An

Re: [HACKERS] [Fwd: plpgsql and booleans?]

2004-01-20 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > 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) || '';''; Seems it'd be easier without EXECUTE: UPDATE test_table SET test_col = NE

Re: [HACKERS] [Fwd: plpgsql and booleans?]

2004-01-20 Thread Christopher Kings-Lynne
EXECUTE ''UPDATE test_table SET test_col '' || quote_literal(NEW.test_col2) || '';''; Seems it'd be easier without EXECUTE: UPDATE test_table SET test_col = NEW.test_col2; Actually, yes you're right - we don't need EXECUTE in our case. However, it still doesn't answer the question of how you