public inbox for [email protected]  
help / color / mirror / Atom feed
From: jian he <[email protected]>
To: Dmitry Dolgov <[email protected]>
Cc: Joe Conway <[email protected]>
Cc: [email protected]
Subject: Re: System views for versions reporting
Date: Thu, 2 Jan 2025 10:36:48 +0800
Message-ID: <CACJufxFD7ra6-HYmksJPMrY8Q036HA6EFyrUjrOPiq8CrfkGvg@mail.gmail.com> (raw)
In-Reply-To: <5jhyl6p3nwcaxczfxuh25q42q6bqlaxyqyfqtw4tldvmm24bw2@rfii5tkwn5rg>
References: <vximpev4vsyqvzvjn3qxb2apltuaxw7j4uxc4lggyjh3ejjbzx@66clgfgm6vlk>
	<[email protected]>
	<tbbg5xlg46w4us4siwqa7v4y6lbr67hojjg5xgagwihrbsceh5@nfw62fdocrbc>
	<5jhyl6p3nwcaxczfxuh25q42q6bqlaxyqyfqtw4tldvmm24bw2@rfii5tkwn5rg>

hi.
https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F5318
shows lots of failures, but it doesn't seem to tell you about doc build failure.

+ <sect1 id="view-pg-system-versions">
+  <title><structname>pg_system_versions</structname></title>
+
+  <indexterm zone="view-pg-system-version">
+   <primary>pg_system_versions</primary>
+  </indexterm>

+  <indexterm zone="view-pg-system-version">
should change to
+  <indexterm zone="view-pg-system-versions">
otherwise cannot build doc.


+  <table>
+   <title><structname>pg_system_versions</structname> Columns</title>
+   <tgroup cols="1">
...
column "type" of view pg_system_versions is missing in the doc entry
?


+ if (found)
+ ereport(ERROR,
+ (errcode(ERRCODE_DUPLICATE_OBJECT),
+ errmsg("duplicated system version")));
this is unlikely to happen (not user visible error), normally we
should just use elog(ERROR...)
?


+typedef enum VersionType
+{
+ CompileTime,
+ RunTime,
+} VersionType;
+
+typedef struct SystemVersion
+{
+ char name[NAMEDATALEN]; /* Unique component name, used as a key
+ * for versions HTAB */
+ VersionType type;
+ SystemVersionCB callback; /* Callback to fetch the version string */
+} SystemVersion;
these two structs also need to be added into src/tools/pgindent/typedefs.list?


--- a/src/include/utils/system_version.h
+++ b/src/include/utils/system_version.h
@@ -11,6 +11,7 @@
 #ifndef SYSTEM_VERSION_H
 #define SYSTEM_VERSION_H

+#include <gnu/libc-version.h>
 #include <link.h>

"gnu/libc-version.h" does not exist in the clang compiler?
will "link.h" everywhere?




Currently, only a few rows are displayed for pg_system_versions. If I have
linked a dependency, I should be able to retrieve its version—for example, I
should be able to determine the version of zstd (i have linked the
zstd dependency).






view thread (5+ 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]
  Subject: Re: System views for versions reporting
  In-Reply-To: <CACJufxFD7ra6-HYmksJPMrY8Q036HA6EFyrUjrOPiq8CrfkGvg@mail.gmail.com>

* 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