X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5A919475F26 for ; Fri, 9 May 2003 11:31:41 -0400 (EDT) Received: from mail.deltav.hu (mail.deltav.hu [213.163.0.192]) by postgresql.org (Postfix) with ESMTP id 20262475CBC for ; Fri, 9 May 2003 11:31:40 -0400 (EDT) Received: from fejleszt2 ([213.163.10.103]) by mail.deltav.hu (Netscape Messaging Server 3.6) with SMTP id AAA1581 for ; Fri, 9 May 2003 17:31:43 +0200 Message-ID: <004c01c31640$17c350a0$0a03a8c0@fejleszt2> From: "=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" To: References: <20030508122129.F46321-100000@megazone23.bigpanda.com> Subject: Re: "too clever" when creating SQL functions Date: Fri, 9 May 2003 17:31:42 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, hits=-25.1 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,ORIGINAL_MESSAGE,REFERENCES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/184 X-Sequence-Number: 13349 Istv=E1n :) This answers my question, thanks :) G. -- while (!asleep()) sheep++; ---------------------------- cut here ------------------------------ ----- Original Message ----- From: "Stephan Szabo" Sent: Thursday, May 08, 2003 9:22 PM On Thu, 8 May 2003, [iso-8859-2] SZ=DBCS G=E1bor 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" =3D 0 WHERE "relname" =3D 'a'; COPY "a" FROM stdin; \. -- Enable triggers UPDATE pg_class SET reltriggers =3D (SELECT count(*) FROM pg_trigger where pg_class.oid =3D tgrelid) WHERE relname =3D 'a';