pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Move tests of contrib/spi/ out of the core regression tests
Date: Tue, 08 Apr 2025 17:13:58 -0400
Message-ID: <4076864.1744146838@sss.pgh.pa.us> (raw)
In-Reply-To: <350fb18c-dce6-4db3-aed7-ac8711c9ab62@iki.fi>
References: <3872677.1744077559@sss.pgh.pa.us>
	<33bd7e6e-b652-46f2-a911-f0ba8909d060@iki.fi>
	<692d7335-0b65-48c5-a731-afc2c90e35ab@dunslane.net>
	<3975773.1744120535@sss.pgh.pa.us>
	<350fb18c-dce6-4db3-aed7-ac8711c9ab62@iki.fi>

Heikki Linnakangas <hlinnaka@iki.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





view thread (7+ messages)

Message-ID: <4076864.1744146838@sss.pgh.pa.us>
Permalink:  ../4076864.1744146838@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4076864.1744146838@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hlinnaka@iki.fi, andrew@dunslane.net
  Subject: Re: Move tests of contrib/spi/ out of the core regression tests
  In-Reply-To: <4076864.1744146838@sss.pgh.pa.us>
  References: <3872677.1744077559@sss.pgh.pa.us> <33bd7e6e-b652-46f2-a911-f0ba8909d060@iki.fi> <692d7335-0b65-48c5-a731-afc2c90e35ab@dunslane.net> <3975773.1744120535@sss.pgh.pa.us> <350fb18c-dce6-4db3-aed7-ac8711c9ab62@iki.fi> <4076864.1744146838@sss.pgh.pa.us>

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

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