Skip to content

Commit 5086dfc

Browse files
committed
doc: recommend use of GUC server_version_num for version checks
Patch by Craig Ringer
1 parent f19d8f1 commit 5086dfc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/src/sgml/func.sgml

+7-2
Original file line numberDiff line numberDiff line change
@@ -14617,7 +14617,7 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n);
1461714617
<row>
1461814618
<entry><literal><function>version()</function></literal></entry>
1461914619
<entry><type>text</type></entry>
14620-
<entry><productname>PostgreSQL</> version information</entry>
14620+
<entry><productname>PostgreSQL</> version information. See also <xref linkend="guc-server-version-num"> for a machine-readable version.</entry>
1462114621
</row>
1462214622
</tbody>
1462314623
</tgroup>
@@ -14804,7 +14804,12 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
1480414804

1480514805
<para>
1480614806
<function>version</function> returns a string describing the
14807-
<productname>PostgreSQL</productname> server's version.
14807+
<productname>PostgreSQL</productname> server's version. You can also
14808+
get this information from <xref linkend="guc-server-version"> or
14809+
for a machine-readable version, <xref linkend="guc-server-version-num">.
14810+
Software developers should use <literal>server_version_num</literal>
14811+
(available since 8.2) or <xref linkend="libpq-pqserverversion"> instead
14812+
of parsing the text version.
1480814813
</para>
1480914814

1481014815
<indexterm>

0 commit comments

Comments
 (0)