Re: Move tests of contrib/spi/ out of the core regression tests

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Move tests of contrib/spi/ out of the core regression tests
Date: 2025-04-08 21:13:58
Message-ID: 4076864.1744146838@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> On 08/04/2025 16:55, Tom Lane wrote:
>> + The trigger will replace the field's value only if that value is
>> + initially zero or null (after the action of the SQL statement that
>> + inserted or updated the row). Also, if the sequence's next value is
>> + zero, <function>nextval()</function> will be called a second time in
>> + order to obtain a non-zero value.

> That's a much clearer explanation of the behavior, but now that I read
> that paragraph, I wonder *why* it behaves like that. I'm sure it's just
> historical reasons. But perhaps we should nuke autoinc altogether?

Yeah, we were kind of wondering that about refint.c as well. But in
the end, none of the stuff in contrib/spi/ has much value as
production code. It's meant to be examples you can start from and
modify. In that light, I'm more worried about whether the coding
style is good than whether the definition is useful.

In any case, if we decided to nuke the modules entirely, we'd still
need half of the present patch in order to remove the core tests'
dependency on them. So I'll go ahead and push this, and then we
have a more self-contained target if we decide we don't want 'em.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2025-04-08 21:22:03 Re: Remove unnecessary static type qualifiers
Previous Message Andres Freund 2025-04-08 21:06:21 Re: Finalizing read stream users' flag choices