System Table Query

Started by John Bellabout 24 years ago5 messagesgeneral
Jump to latest
#1John Bell
jbellpostgres@yahoo.com.au

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.

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: John Bell (#1)
Re: System Table Query

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).

#3John Bell
jbellpostgres@yahoo.com.au
In reply to: Stephan Szabo (#2)
Re: System Table Query

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.

#4Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: John Bell (#3)
Re: System Table Query

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.

#5Jeff Anto
antojf2001@yahoo.fr
In reply to: Stephan Szabo (#4)
a strange output from vacuum

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