Re: "too clever" when creating SQL functions

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: SZŰCS Gábor <surrano(at)mailbox(dot)hu>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: "too clever" when creating SQL functions
Date: 2003-05-08 19:22:16
Message-ID: 20030508122129.F46321-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Thu, 8 May 2003, [iso-8859-2] SZCS Gbor wrote:

> didn't make it in data-only (-a) mode either.

I forgot to mention that it probably requires that there be foreign keys.
:)

But, it basically does:

-- Disable triggers
UPDATE "pg_class" SET "reltriggers" = 0 WHERE "relname" = 'a';

COPY "a" FROM stdin;
\.
-- Enable triggers
UPDATE pg_class SET reltriggers = (SELECT count(*) FROM pg_trigger where
pg_class.oid = tgrelid) WHERE relname = 'a';

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message chester c young 2003-05-08 19:26:33 Re: does this require a stored procedure?
Previous Message Alex Rice 2003-05-08 18:50:02 does this require a stored procedure?