From: | Jason Friedman <jason(at)powerpull(dot)net> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | user-defined functions/triggers; cannot dump |
Date: | 2002-07-04 19:24:21 |
Message-ID: | 20020704192421.C29031@abigail |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I recently added a table, a function, and trigger to launch that
function upon update.
drop sequence bad_email_address_id;
create sequence bad_email_address_id;
drop table bad_email_address;
create table bad_email_address (
id integer not null default nextval('bad_email_address_id'),
email_address varchar(100) not null,
error_message varchar(100),
create_date datetime default current_timestamp(0),
last_update_date datetime
);
alter table bad_email_address add constraint bad_email_address_pk
primary key (id);
alter table bad_email_address add constraint bad_email_address_u
unique(email_address,error_message);
drop function trigger_update_bad_email_addres();
drop function trigger_update_bad_email_address();
drop function update_bad_email_address();
CREATE FUNCTION "update_bad_email_address" () RETURNS opaque AS 'begin
new.last_update_date = current_timestamp(0);
return new;
end;' LANGUAGE 'plpgsql';
DROP TRIGGER "trigger_update_bad_email_addres" ON bad_email_address;
DROP TRIGGER "update_bad_email_address" ON bad_email_address;
CREATE TRIGGER "update_bad_email_address"
BEFORE UPDATE ON "bad_email_address"
FOR EACH ROW EXECUTE PROCEDURE "update_bad_email_address" ();
First, how do I list user-defined functions?
Second, why do I get this error when I dump:
pg_dump -s dmatchingmoms pg_dump: query to obtain procedure name for
trigger "trigger_update_bad_email_addres" did not return exactly one
result
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Hyde | 2002-07-04 20:14:11 | determining Inheritance among tables |
Previous Message | Chris Thompson | 2002-07-04 17:35:33 | limiting a select |