Re: Broken pg_class table
От | Roger Ging |
---|---|
Тема | Re: Broken pg_class table |
Дата | |
Msg-id | 44BA5B23.2070204@musicreports.com обсуждение исходный текст |
Ответ на | Re: Broken pg_class table (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Broken pg_class table
|
Список | pgsql-admin |
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(*) frompg_trigger where tgrelid = <br /> (select oid from pg_class where relname = '$tbl' and relnamespace = <br /> (selectoid 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.1153026781@sss.pgh.pa.us" type="cite"><prewrap="">Roger Ging <a class="moz-txt-link-rfc2396E" href="mailto:roger@musicreports.com"><roger@musicreports.com></a>writes: </pre><blockquote type="cite"><pre wrap="">Iaccidentally 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>
В списке pgsql-admin по дате отправления: