pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedUpdateing pg_trigger and pg_constraint
3+ messages / 2 participants
[nested] [flat]
* Updateing pg_trigger and pg_constraint
@ 2005-08-17 18:00 Craig Servin <cservin@cromagnon.com>
2005-08-17 20:40 ` Re: Updateing pg_trigger and pg_constraint Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Craig Servin @ 2005-08-17 18:00 UTC (permalink / raw)
To: pgsql-admin
I am trying to make some foreign keys deferrable and initially deferred.
These foreign key constraints already exist so I was going to change them by
updating pg_trigger and pg_constraint.
However the changes do not seem to take affect. Is there something I need to
do to get PostgreSQL to recognize that I have tweaked it's tables?
This is the query that I used:
begin work;
update pg_constraint set condeferrable = true, condeferred = true where
contype ='f';
update pg_trigger set tgdeferrable = true, tginitdeferred = true where
tgconstrname in ( select conname from pg_constraint where contype = 'f' );
commit
any help would be appreciated,
Craig
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Updateing pg_trigger and pg_constraint
2005-08-17 18:00 Updateing pg_trigger and pg_constraint Craig Servin <cservin@cromagnon.com>
@ 2005-08-17 20:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-08-17 21:40 ` Re: Updateing pg_trigger and pg_constraint Craig Servin <cservin@cromagnon.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2005-08-17 20:40 UTC (permalink / raw)
To: Craig Servin <cservin@cromagnon.com>; +Cc: pgsql-admin
Craig Servin <cservin@cromagnon.com> writes:
> I am trying to make some foreign keys deferrable and initially deferred.
> These foreign key constraints already exist so I was going to change them by
> updating pg_trigger and pg_constraint.
> However the changes do not seem to take affect. Is there something I need to
> do to get PostgreSQL to recognize that I have tweaked it's tables?
Try starting a fresh backend session. Manual hacking of those tables
isn't going to cause a relcache reload ...
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Updateing pg_trigger and pg_constraint
2005-08-17 18:00 Updateing pg_trigger and pg_constraint Craig Servin <cservin@cromagnon.com>
2005-08-17 20:40 ` Re: Updateing pg_trigger and pg_constraint Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-08-17 21:40 ` Craig Servin <cservin@cromagnon.com>
0 siblings, 0 replies; 3+ messages in thread
From: Craig Servin @ 2005-08-17 21:40 UTC (permalink / raw)
To: pgsql-admin; +Cc: Tom Lane <tgl@sss.pgh.pa.us>
> Try starting a fresh backend session. Manual hacking of those tables
> isn't going to cause a relcache reload ...
>
Simply reconnecting to the backend does not help. If I restart the server
everything works as expected. I am wondering if there is a way to trigger a
relcache reload without shutting down the PostgreSQL.
Craig
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-08-17 21:40 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-17 18:00 Updateing pg_trigger and pg_constraint Craig Servin <cservin@cromagnon.com>
2005-08-17 20:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-08-17 21:40 ` Craig Servin <cservin@cromagnon.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox