root/sql/sprocs/prism.check_name_saved_graphs.sql

Revision a27cd9b462a686609eff744d1e6553da5605090b, 329 bytes (checked in by Depesz Lubaczewski <depesz@omniti.com>, 4 years ago)

prism procedures, and simple tool to split pg_dump -n prism -s output into many files

  • Property mode set to 100644
Line 
1 CREATE OR REPLACE FUNCTION prism.check_name_saved_graphs() RETURNS trigger
2     AS $$
3 DECLARE
4 BEGIN
5     IF  NEW.saved IS true AND NEW.title IS null THEN
6     RAISE EXCEPTION 'You must name graph to save.';
7     END IF;
8  RETURN NEW;
9 END
10 $$
11     LANGUAGE plpgsql;
12
13
14 ALTER FUNCTION prism.check_name_saved_graphs() OWNER TO reconnoiter;
Note: See TracBrowser for help on using the browser.