public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Dmitrii Bondar <[email protected]>
Cc: Paul Jungwirth <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Lilian <[email protected]>
Subject: Re: [fixed] Trigger test
Date: Sat, 05 Apr 2025 15:54:18 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<174293570374.60294.13024599409215069922.pgcf@coridan.postgresql.org>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

Dmitrii Bondar <[email protected]> writes:
> On 04/04/2025 01:11, Tom Lane wrote:
>> So that's a long laundry list and we haven't even dug hard.
>> Is it worth it?  If you feel like doing the legwork then
>> I'm willing to support the project, but I really wonder if
>> we shouldn't cut our losses and just remove the module.

> You wrote a note that I decided to omit. As I mentioned, the patch does 
> not even fix the cascade update problem—there are still broken 
> cases—because it seems impossible to address it in a gentle way (the 
> code was patched 20 years ago; it's truly legacy).

I'm not terribly concerned about whether these triggers have perfect
foreign-key semantics, since no one (in their right mind) would use
them as foreign-key enforcement anyway.  What they're good for
is as examples of writing checks and updates in C-coded triggers.
As such, questions like "are identifiers and data values quoted
appropriately" seem far more urgent than whether cascade update
works per spec.  Even just using a StringInfo rather than a fixed-size
char[] variable to build the query in would be an improvement.

> I considered removing it entirely, but that seemed too drastic a 
> solution (and, at the very least, I don't have enough expertise to make 
> that decision).

I'm not that thrilled with giving up on refint.c either.  But in its
current state, it's a pretty lousy example.  Are we willing to put
enough effort into making it a more useful code example?

			regards, tom lane






view thread (4+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [fixed] Trigger test
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox