Thread: System Table Query

System Table Query

From
John Bell
Date:
Can anyone tell me where the ON DELETE <action> and ON
UPDATE <action> rules for foreign keys are stored in
the system tables.  I would have expected to find them
in one of the relevent pg_trigger entries (ie. one
with a tgtype of 9, 17 or 21).  However there is no
difference in these entries regardless of the value of
<action>.  I have also scoured other system tables to
no avail.

John Bell


http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.

Re: System Table Query

From
Stephan Szabo
Date:
On Fri, 8 Mar 2002, [iso-8859-1] John Bell wrote:

> Can anyone tell me where the ON DELETE <action> and ON
> UPDATE <action> rules for foreign keys are stored in
> the system tables.  I would have expected to find them
> in one of the relevent pg_trigger entries (ie. one
> with a tgtype of 9, 17 or 21).  However there is no
> difference in these entries regardless of the value of
> <action>.  I have also scoured other system tables to
> no avail.

It's based on the function called by the trigger (tgfoid).


Re: System Table Query

From
John Bell
Date:
Thanks Stephan.  I've found the relevant pg_proc
entries now and am able to proceed.  Are there any
ancillary sources of information on the system tables
(other than the source, which is a bit too easy to get
lost in!) over and above what comes in the standard
documentation, which I find bit thin in this area for
my purposes?

Regards,
John Bell

 --- Stephan Szabo <sszabo@megazone23.bigpanda.com>
wrote: >
> On Fri, 8 Mar 2002, [iso-8859-1] John Bell wrote:
>
> > Can anyone tell me where the ON DELETE <action>
> and ON
> > UPDATE <action> rules for foreign keys are stored
> in
> > the system tables.  I would have expected to find
> them
> > in one of the relevent pg_trigger entries (ie. one
> > with a tgtype of 9, 17 or 21).  However there is
> no
> > difference in these entries regardless of the
> value of
> > <action>.  I have also scoured other system tables
> to
> > no avail.
>
> It's based on the function called by the trigger
> (tgfoid).
>

http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.

Re: System Table Query

From
Stephan Szabo
Date:
On Fri, 8 Mar 2002, [iso-8859-1] John Bell wrote:

> Thanks Stephan.  I've found the relevant pg_proc
> entries now and am able to proceed.  Are there any
> ancillary sources of information on the system tables
> (other than the source, which is a bit too easy to get
> lost in!) over and above what comes in the standard
> documentation, which I find bit thin in this area for
> my purposes?

I think Bruce may have written some stuff that might be useful and
there's some info on techdocs.postgresql.org on the RI constraints at
least (techdocs is great :) ). Otherwise I think it's mostly question and
answer.



a strange output from vacuum

From
Jeff Anto
Date:
Hi all,
I have (recurrent) cache lookup pb in my db and I
didn't find out the solution yet. But, doing a vacuum,
I got the following :
db=# vacuum;
NOTICE:  RegisterSharedInvalid: SI buffer overflow
NOTICE:  InvalidateSharedInvalid: cache state reset
VACUUM
I have no ideas about possible correlation...

Moreover, and may be of little help, here is a
fragment of a vacuum verbose: this thing seems to be
thrown when vacuuming pg_attribute.

NOTICE:  --Relation pg_attribute--
NOTICE:  Pages 48: Changed 21, reaped 26, Empty 0, New
0; Tup 2147: Vac 1590, Keep/VTL 0/0, Crash 0, UnUsed
0, MinLen 98, MaxLen 98; Re-using: Free/Avail. Space
160560/160560; EndEmpty/Avail. Pages 0/26. CPU
0.00s/0.00u sec.
NOTICE:  Index pg_attribute_relid_attnam_index: Pages
152; Tuples 2147: Deleted 1590. CPU 0.02s/0.01u sec.
NOTICE:  Index pg_attribute_relid_attnum_index: Pages
64; Tuples 2147: Deleted 1590. CPU 0.01s/0.03u sec.
NOTICE:  Rel pg_attribute: Pages: 48 --> 28; Tuple(s)
moved: 1536. CPU 0.00s/0.12u sec.
NOTICE:  Index pg_attribute_relid_attnam_index: Pages
153; Tuples 2147: Deleted 1536. CPU 0.02s/0.02u sec.
NOTICE:  Index pg_attribute_relid_attnum_index: Pages
66; Tuples 2147: Deleted 1536. CPU 0.01s/0.01u sec.
NOTICE:  RegisterSharedInvalid: SI buffer overflow
NOTICE:  InvalidateSharedInvalid: cache state reset

Has anybody seen such a thing before ?
Thanks,

Jeff.


___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com