Re: [PATCH] Slight improvement of worker_spi.c example - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Slight improvement of worker_spi.c example
Date
Msg-id ZHvAFA_sBibWpyrR@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] Slight improvement of worker_spi.c example  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: [PATCH] Slight improvement of worker_spi.c example
Re: [PATCH] Slight improvement of worker_spi.c example
List pgsql-hackers
On Sat, Jun 03, 2023 at 03:34:30PM +0300, Aleksander Alekseev wrote:
> Agree. It is a simple example and I don't think it's going to be
> useful to make a complicated one out of it.

It does not have to be complicated, but I definitely agree that we'd
better spend some efforts in improving it as a whole especially
knowing that this is mentioned on the docs as an example that one
could rely on.

> The order of the calls it currently uses however may be extremely
> confusing for newcomers. It creates an impression that this particular
> order is extremely important while in fact it's not and it takes time
> to figure this out.

+       * The order of PushActiveSnapshot() and SPI_connect() is not really
+       * important.

FWIW, looking at the patch, I don't think that this is particularly
useful.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Implement generalized sub routine find_in_log for tap test
Next
From: Andres Freund
Date:
Subject: Re: New Table Access Methods for Multi and Single Inserts