public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: Dmitry Dolgov <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: jian he <[email protected]>
Cc: Joe Conway <[email protected]>
Cc: [email protected]
Subject: Re: System views for versions reporting
Date: Wed, 26 Nov 2025 14:28:06 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <xzbehdw5d7caffbvwfjhrmmqigmrha2qx7krshoivbr7dgcjd6@5enodmbfc5sz>
References: <[email protected]>
	<tbbg5xlg46w4us4siwqa7v4y6lbr67hojjg5xgagwihrbsceh5@nfw62fdocrbc>
	<5jhyl6p3nwcaxczfxuh25q42q6bqlaxyqyfqtw4tldvmm24bw2@rfii5tkwn5rg>
	<CACJufxFD7ra6-HYmksJPMrY8Q036HA6EFyrUjrOPiq8CrfkGvg@mail.gmail.com>
	<burlbnmi2a2mxt33migp3m3pqglgtat3axak2prmhiwhwuljxv@7ea4hlniydvk>
	<[email protected]>
	<yewkpc65y5g6fjd3kge2jetge3q2625hz64mietmyoczhqkmpu@ltotskxk4ndk>
	<vyejydf4qnamuyz4slawjqzuhl3kgzfzgrtruwiuse2v6xitaa@ejvkxapdvqh5>
	<[email protected]>
	<jx5ozoohe653lf2f7p4j65b76pikqymdunpopjkeznfdzwgokv@bt43jrh226ee>
	<xzbehdw5d7caffbvwfjhrmmqigmrha2qx7krshoivbr7dgcjd6@5enodmbfc5sz>

On Tue, 2025-11-25 at 16:40 +0100, Dmitry Dolgov wrote:
> Here is the updated patch.

Thanks for the updated patch.

Comments:

You didn't address any of my suggestions concerning the documentation,
except that you moved the entry in "System Views" to the correct place.

The second patch contains:

> +void
> +jit_register_version(void)
> +{
> +   add_system_version("LLVM", jit_get_version, RunTime);
> +}

But that belongs into the third patch.

+/*
+ * Callback for add_system_version, returns JIT provider's version string and
+ * reports if it's not available.
+ */
+const char *
+jit_get_version(bool *available)
+{
+   const char *version;
+
+   if (!provider_init())
+   {
+       *available = false;
+       return "";
+   }
+
+   version = provider.get_version();
+
+   if (version == NULL)
+   {
+       *available = false;
+       return "";
+   }
+
+   *available = true;
+   return version;
+}

Perhaps more elegant would be:

    if (provider_init())
    {
        version = provider.get_version();
        if (version)
        {
            *available = true;
            return version;
        }
    }

    *available = false;
    return "";

Other than that, it looks fine.

Yours,
Laurenz Albe





view thread (15+ messages)  latest in thread

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: System views for versions reporting
  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