Re: [GENERAL] Disabling triggers in a transaction

2005-03-13 Thread Adam Tomjack
Bruce Momjian wrote: Geoffrey wrote: Terry Lee Tucker wrote: Tom, Do you feel this is a safe method for disabling triggers in the rare cases where one finds that it is prudent to do that? Do you think that the column, "reltriggers", is permanent fixture in pg_class? What is your advice on this? I

Re: [GENERAL] pl sql to check if table of table_name exists

2005-03-13 Thread Adam Tomjack
Shaun Clements wrote: Hi Hate to ask, but it isnt obvious to me from the documentation. How do I perform a query in pgplsql, to check it a table exists of a particular name. Thanks in advance Kind Regards, Shaun Clements -- A list of tables: SELECT schemaname, tablename FROM pg_tables; -- Returns t

Re: [GENERAL] Disabling triggers in a transaction

2005-03-09 Thread Adam Tomjack
lue=FALSE WHERE id=2; RETURN TRUE; END; ' LANGUAGE plpgsql VOLATILE; --- CREATE FUNCTION log_trigger() RETURNS trigger AS ' BEGIN IF logging_enabled() THEN --do_logging; END IF; RETURN NEW; --or something ' LANGUAGE plpgsql VOLAT

[GENERAL] Can't delete - Need cascading update instead

2005-03-08 Thread Adam Tomjack
ial server-side solutions that I'm missing? Thanks for reading, Adam Tomjack -- My failed update trigger: CREATE OR REPLACE FUNCTION my_cascading_deleter() RETURNS "trigger" LANGUAGE 'plpgsql' VOLATILE AS $BODY$ DECLARE r RECORD; r2 RECORD;