Received: from mail.virginia.edu (mail.Virginia.EDU [128.143.2.9]) by postgresql.org (Postfix) with SMTP id B489F47603C for ; Tue, 9 Apr 2002 10:06:17 -0400 (EDT) Received: from smtp.mail.virginia.edu by mail.virginia.edu id ac29846; 9 Apr 2002 10:06 EDT Received: from jlk3xpc (d-128-19-222.bootp.Virginia.EDU [128.143.19.222]) by smtp.mail.Virginia.EDU (8.9.3/8.9.3) with SMTP id KAA30916 for ; Tue, 9 Apr 2002 10:06:19 -0400 Message-ID: <00a001c1dfd0$4818a1d0$de138f80@virginia.edu> From: Jodi Kanter To: Postgres Admin List Subject: table dump Date: Tue, 9 Apr 2002 10:10:19 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_009D_01C1DFAE.C0DC2140" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200204/76 X-Sequence-Number: 3964 This is a multi-part message in MIME format. ------=_NextPart_000_009D_01C1DFAE.C0DC2140 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I just completed a data only dump of a table by using the following command: pg_dump genex -Rau -t species > species.sql I noticed that the first line of the file seems to be disabling some postgr= es trigger. It reads: UPDATE "pg_class" SET "reltriggers" =3D 0 WHERE "relname" =3D 'species'; Then all the data is listed. At the end of the file the triggers are enabled again with the following co= mmand: UPDATE pg_class SET reltriggers =3D (SELECT count(*) FROM pg_trigger where = pg_class.oid =3D tgrelid) WHERE relname =3D 'species'; Can someone explain why this is happening? The problem is that I am coping = this dump into another schema creation file that I have. I want the data fr= om this particular file included in with my new database. However, I am cre= ating this database with a user account so that all tables will be owned by= that user. I think the problem here is that this trigger stuff requires th= at you be signed in as postgres in order to do anything with the pg_class t= able. correct? Any assistane would be greatly appreciated. thanks, Jodi _______________________________ Jodi L Kanter BioInformatics Database Administrator University of Virginia (434) 924-2846 jkanter@virginia.edu =20 =20 =20 ------=_NextPart_000_009D_01C1DFAE.C0DC2140 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I just completed a data only dump of a = table=20 by using the following command:
 
pg_dump genex -Rau -t species= >=20 species.sql
 
I noticed that the first line of the fi= le=20 seems to be disabling some postgres trigger. It reads:
 
UPDATE "pg_class" SET "reltriggers" =3D= 0 WHERE=20 "relname" =3D 'species';
 
Then all the data is listed.
 
At the end of the file the triggers are= =20 enabled again with the following command:
 
UPDATE pg_class SET reltriggers =3D (SE= LECT=20 count(*) FROM pg_trigger where pg_class.oid =3D tgrelid) WHERE relname =3D= =20 'species';
 
Can someone explain why this is happeni= ng? The=20 problem is that I am coping this dump into another schema creation file tha= t I=20 have. I want the data from this particular file included in with my new=20 database. However, I am creating this database with a user account so that = all=20 tables will be owned by that user. I think the problem here is that this tr= igger=20 stuff requires that you be signed in as postgres in order to do anything wi= th=20 the pg_class table. correct?
 
Any assistane would be greatly=20 appreciated.
thanks,
Jodi
 

 
 

_______________________________
Jodi=20 L Kanter
BioInformatics Database Administrator
University of=20 Virginia
(434) 924-2846
jkanter@virginia.edu

 

 

 

<= /DIV> ------=_NextPart_000_009D_01C1DFAE.C0DC2140--