Re: [PATCH] Slight improvement of worker_spi.c example

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Julien Rouhaud <rjuju123(at)gmail(dot)com>
Subject: Re: [PATCH] Slight improvement of worker_spi.c example
Date: 2023-06-03 22:35:00
Message-ID: ZHvAFA_sBibWpyrR@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-06-03 22:38:24 Re: New Table Access Methods for Multi and Single Inserts
Previous Message Michael Paquier 2023-06-03 22:21:27 Re: Implement generalized sub routine find_in_log for tap test