Re: Add llvm version into the version string - Mailing list pgsql-hackers

From Alastair Turner
Subject Re: Add llvm version into the version string
Date
Msg-id CAC0GmyzC2KkO=UAyVy7Zq15dw4C-xW23d8EnUjD9nrQsS5dsww@mail.gmail.com
Whole thread Raw
In response to Re: Add llvm version into the version string  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Add llvm version into the version string
List pgsql-hackers


On Mon, 23 Sept 2024 at 19:45, Tom Lane <tgl@sss.pgh.pa.us> wrote:
...
Maybe another idea could be a new system view?

=> select * from pg_system_version;
     property     |     value
----------------------------------------
 core version     | 18.1
 architecture     | x86_64-pc-linux-gnu
 word size        | 64 bit
 compiler         | gcc (GCC) 12.5.0
 ICU version      | 60.3
 LLVM version     | 18.1.0
 ...

 
A view like that sounds very useful.
 
Adding rows to a view over time seems way less likely to cause
problems than messing with a string people probably have crufty
parsing code for.

>> If it's going to be a new separate function, I guess it won't
>> make much difference to ask either to call the new function or the
>> llvm-config, right?

I do think that if we can get a version number out of the loaded
library, that is worth doing.  I don't trust the llvm-config that
happens to be in somebody's PATH to be the same version that their
PG is actually built with.


Since the build and runtime versions may differ for some things like llvm, libxml2 and the interpreters behind some of the PLs, it may be valuable to expand the view and show two values - a build time (or configure time) value and a runtime value for these.

Regards

Alastair

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: index_delete_sort: Unnecessary variable "low" is used in heapam.c
Next
From: Heikki Linnakangas
Date:
Subject: Re: AIX support