]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
doc: Add getdatabaseencoding to function docs
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Wed, 29 Jul 2026 10:37:02 +0000 (12:37 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Wed, 29 Jul 2026 10:37:02 +0000 (12:37 +0200)
The getdatabaseencoding function was added in bf00bbb0c494 in 1998 but
was never documented.  While mostly used in tests, there is no reason
not to document it as this function isn't going anywhere and is already
used in extensions.

Author: Ian Barwick <barwick@gmail.com>
Reviewed-by: Thom Brown <thom@linux.com>
Reviewed-by: surya poondla <suryapoondla4@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CAB8KJ=ij+pznQGub=DkyJuKL=tC=Q=07qSahTyw7TLb0DdNJsg@mail.gmail.com

doc/src/sgml/func/func-string.sgml

index 0786573d7be15e15bf612cdf60c3d546a73f30b8..fb7408ee014702377224ab524da6f5b8c01a85bd 100644 (file)
        </para></entry>
       </row>
 
+      <row>
+       <entry role="func_table_entry"><para role="func_signature">
+        <indexterm>
+         <primary>getdatabaseencoding</primary>
+        </indexterm>
+        <function>getdatabaseencoding</function> ( )
+        <returnvalue>name</returnvalue>
+       </para>
+       <para>
+        Returns current database encoding name.
+       </para>
+       <para>
+        <literal>getdatabaseencoding()</literal>
+        <returnvalue>UTF8</returnvalue>
+       </para></entry>
+      </row>
+
       <row>
        <entry role="func_table_entry"><para role="func_signature">
         <indexterm>