<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Sorry, should have been more specific.<br>
Version 8.1.0<br>
<br>
update statement called from a bash script where $tbl is table name and
$sch is schema name<br>
<br>
update pg_class set reltriggers = <br>
(select count(*) from pg_trigger where tgrelid = <br>
(select oid from pg_class where relname = '$tbl' and relnamespace = <br>
(select oid from pg_namespace where nspname = '$sch')))--should have
been a limiting where clause here<br>
<br>
<br>
Thanks,<br>
<br>
Roger<br>
<br>
Tom Lane wrote:
<blockquote cite="mid27390(dot)1153026781(at)sss(dot)pgh(dot)pa(dot)us" type="cite">
<pre wrap="">Roger Ging <a class="moz-txt-link-rfc2396E" href="mailto:roger(at)musicreports(dot)com"><roger(at)musicreports(dot)com></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">I accidentally wrecked the pg_class table in a database by leaving off
the where clause of an update statement when setting the reltriggers
back to the count from pg_trigger after a bulk data load.
</pre>
</blockquote>
<pre wrap=""><!---->
What was the *exact* update statement, and which PG version is this?
regards, tom lane
</pre>
</blockquote>
</body>
</html>