Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 05a5ede

Browse files
nbyavuzCommitfest Bot
authored and
Commitfest Bot
committed
meson: [WIP] Add docs for postgresql-extension.pc
Author: Andres Freund <andres@anarazel.de> Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Discussion: https://postgr.es/m/206b001d-1884-4081-bd02-bed5c92f02ba%40eisentraut.org
1 parent 6041e86 commit 05a5ede

File tree

3 files changed

+66
-39
lines changed

3 files changed

+66
-39
lines changed

doc/src/sgml/acronyms.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@
579579
<term><acronym>PGXS</acronym></term>
580580
<listitem>
581581
<para>
582-
<link linkend="extend-pgxs"><productname>PostgreSQL</productname> Extension System</link>
582+
<link linkend="extend-postgres-pgxs"><productname>PostgreSQL</productname> Extension System</link>
583583
</para>
584584
</listitem>
585585
</varlistentry>

doc/src/sgml/extend.sgml

Lines changed: 64 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@ include $(PGXS)
14261426
</programlisting>
14271427

14281428
This makefile relies on <acronym>PGXS</acronym>, which is described
1429-
in <xref linkend="extend-pgxs"/>. The command <literal>make install</literal>
1429+
in <xref linkend="extend-postgres-pgxs"/>. The command <literal>make install</literal>
14301430
will install the control and script files into the correct
14311431
directory as reported by <application>pg_config</application>.
14321432
</para>
@@ -1439,21 +1439,26 @@ include $(PGXS)
14391439
</sect2>
14401440
</sect1>
14411441

1442-
<sect1 id="extend-pgxs">
1442+
<sect1 id="extend-postgres">
14431443
<title>Extension Building Infrastructure</title>
14441444

1445-
<indexterm zone="extend-pgxs">
1446-
<primary>pgxs</primary>
1447-
</indexterm>
1448-
14491445
<para>
14501446
If you are thinking about distributing your
14511447
<productname>PostgreSQL</productname> extension modules, setting up a
14521448
portable build system for them can be fairly difficult. Therefore
14531449
the <productname>PostgreSQL</productname> installation provides a build
1454-
infrastructure for extensions, called <acronym>PGXS</acronym>, so
1455-
that simple extension modules can be built simply against an
1456-
already installed server. <acronym>PGXS</acronym> is mainly intended
1450+
infrastructure for extensions, called <literal>PGXS</literal>
1451+
(<xref linkend="extend-postgres-pgxs"/>) and
1452+
its meson counterpart <literal>postgresql-extension.pc</literal>
1453+
(<xref linkend="extend-postgres-meson"/>).
1454+
</para>
1455+
1456+
</sect1>
1457+
1458+
<sect1 id="extend-postgres-pgxs">
1459+
<title>PGXS</title>
1460+
1461+
<para> <acronym>PGXS</acronym> is mainly intended
14571462
for extensions that include C code, although it can be used for
14581463
pure-SQL extensions too. Note that <acronym>PGXS</acronym> is not
14591464
intended to be a universal build system framework that can be used
@@ -1493,7 +1498,7 @@ include $(PGXS)
14931498
Set one of these three variables to specify what is built:
14941499

14951500
<variablelist>
1496-
<varlistentry id="extend-pgxs-modules">
1501+
<varlistentry id="extend-postgres-pgxs-modules">
14971502
<term><varname>MODULES</varname></term>
14981503
<listitem>
14991504
<para>
@@ -1503,7 +1508,7 @@ include $(PGXS)
15031508
</listitem>
15041509
</varlistentry>
15051510

1506-
<varlistentry id="extend-pgxs-module-big">
1511+
<varlistentry id="extend-postgres-pgxs-module-big">
15071512
<term><varname>MODULE_big</varname></term>
15081513
<listitem>
15091514
<para>
@@ -1513,7 +1518,7 @@ include $(PGXS)
15131518
</listitem>
15141519
</varlistentry>
15151520

1516-
<varlistentry id="extend-pgxs-program">
1521+
<varlistentry id="extend-postgres-pgxs-program">
15171522
<term><varname>PROGRAM</varname></term>
15181523
<listitem>
15191524
<para>
@@ -1527,7 +1532,7 @@ include $(PGXS)
15271532
The following variables can also be set:
15281533

15291534
<variablelist>
1530-
<varlistentry id="extend-pgxs-extension">
1535+
<varlistentry id="extend-postgres-pgxs-extension">
15311536
<term><varname>EXTENSION</varname></term>
15321537
<listitem>
15331538
<para>
@@ -1539,7 +1544,7 @@ include $(PGXS)
15391544
</listitem>
15401545
</varlistentry>
15411546

1542-
<varlistentry id="extend-pgxs-moduledir">
1547+
<varlistentry id="extend-postgres-pgxs-moduledir">
15431548
<term><varname>MODULEDIR</varname></term>
15441549
<listitem>
15451550
<para>
@@ -1552,7 +1557,7 @@ include $(PGXS)
15521557
</listitem>
15531558
</varlistentry>
15541559

1555-
<varlistentry id="extend-pgxs-data">
1560+
<varlistentry id="extend-postgres-pgxs-data">
15561561
<term><varname>DATA</varname></term>
15571562
<listitem>
15581563
<para>
@@ -1561,7 +1566,7 @@ include $(PGXS)
15611566
</listitem>
15621567
</varlistentry>
15631568

1564-
<varlistentry id="extend-pgxs-data-built">
1569+
<varlistentry id="extend-postgres-pgxs-data-built">
15651570
<term><varname>DATA_built</varname></term>
15661571
<listitem>
15671572
<para>
@@ -1572,7 +1577,7 @@ include $(PGXS)
15721577
</listitem>
15731578
</varlistentry>
15741579

1575-
<varlistentry id="extend-pgxs-data-tsearch">
1580+
<varlistentry id="extend-postgres-pgxs-data-tsearch">
15761581
<term><varname>DATA_TSEARCH</varname></term>
15771582
<listitem>
15781583
<para>
@@ -1582,7 +1587,7 @@ include $(PGXS)
15821587
</listitem>
15831588
</varlistentry>
15841589

1585-
<varlistentry id="extend-pgxs-docs">
1590+
<varlistentry id="extend-postgres-pgxs-docs">
15861591
<term><varname>DOCS</varname></term>
15871592
<listitem>
15881593
<para>
@@ -1592,7 +1597,7 @@ include $(PGXS)
15921597
</listitem>
15931598
</varlistentry>
15941599

1595-
<varlistentry id="extend-pgxs-headers">
1600+
<varlistentry id="extend-postgres-pgxs-headers">
15961601
<term><varname>HEADERS</varname></term>
15971602
<term><varname>HEADERS_built</varname></term>
15981603
<listitem>
@@ -1608,7 +1613,7 @@ include $(PGXS)
16081613
</listitem>
16091614
</varlistentry>
16101615

1611-
<varlistentry id="extend-pgxs-headers-module">
1616+
<varlistentry id="extend-postgres-pgxs-headers-module">
16121617
<term><varname>HEADERS_$MODULE</varname></term>
16131618
<term><varname>HEADERS_built_$MODULE</varname></term>
16141619
<listitem>
@@ -1634,7 +1639,7 @@ include $(PGXS)
16341639
</listitem>
16351640
</varlistentry>
16361641

1637-
<varlistentry id="extend-pgxs-scripts">
1642+
<varlistentry id="extend-postgres-pgxs-scripts">
16381643
<term><varname>SCRIPTS</varname></term>
16391644
<listitem>
16401645
<para>
@@ -1644,7 +1649,7 @@ include $(PGXS)
16441649
</listitem>
16451650
</varlistentry>
16461651

1647-
<varlistentry id="extend-pgxs-scripts-built">
1652+
<varlistentry id="extend-postgres-pgxs-scripts-built">
16481653
<term><varname>SCRIPTS_built</varname></term>
16491654
<listitem>
16501655
<para>
@@ -1655,7 +1660,7 @@ include $(PGXS)
16551660
</listitem>
16561661
</varlistentry>
16571662

1658-
<varlistentry id="extend-pgxs-regress">
1663+
<varlistentry id="extend-postgres-pgxs-regress">
16591664
<term><varname>REGRESS</varname></term>
16601665
<listitem>
16611666
<para>
@@ -1664,7 +1669,7 @@ include $(PGXS)
16641669
</listitem>
16651670
</varlistentry>
16661671

1667-
<varlistentry id="extend-pgxs-regress-opts">
1672+
<varlistentry id="extend-postgres-pgxs-regress-opts">
16681673
<term><varname>REGRESS_OPTS</varname></term>
16691674
<listitem>
16701675
<para>
@@ -1673,7 +1678,7 @@ include $(PGXS)
16731678
</listitem>
16741679
</varlistentry>
16751680

1676-
<varlistentry id="extend-pgxs-isolation">
1681+
<varlistentry id="extend-postgres-pgxs-isolation">
16771682
<term><varname>ISOLATION</varname></term>
16781683
<listitem>
16791684
<para>
@@ -1682,7 +1687,7 @@ include $(PGXS)
16821687
</listitem>
16831688
</varlistentry>
16841689

1685-
<varlistentry id="extend-pgxs-isolation-opts">
1690+
<varlistentry id="extend-postgres-pgxs-isolation-opts">
16861691
<term><varname>ISOLATION_OPTS</varname></term>
16871692
<listitem>
16881693
<para>
@@ -1692,7 +1697,7 @@ include $(PGXS)
16921697
</listitem>
16931698
</varlistentry>
16941699

1695-
<varlistentry id="extend-pgxs-tap-tests">
1700+
<varlistentry id="extend-postgres-pgxs-tap-tests">
16961701
<term><varname>TAP_TESTS</varname></term>
16971702
<listitem>
16981703
<para>
@@ -1701,7 +1706,7 @@ include $(PGXS)
17011706
</listitem>
17021707
</varlistentry>
17031708

1704-
<varlistentry id="extend-pgxs-no-install">
1709+
<varlistentry id="extend-postgres-pgxs-no-install">
17051710
<term><varname>NO_INSTALL</varname></term>
17061711
<listitem>
17071712
<para>
@@ -1711,7 +1716,7 @@ include $(PGXS)
17111716
</listitem>
17121717
</varlistentry>
17131718

1714-
<varlistentry id="extend-pgxs-no-installcheck">
1719+
<varlistentry id="extend-postgres-pgxs-no-installcheck">
17151720
<term><varname>NO_INSTALLCHECK</varname></term>
17161721
<listitem>
17171722
<para>
@@ -1720,7 +1725,7 @@ include $(PGXS)
17201725
</listitem>
17211726
</varlistentry>
17221727

1723-
<varlistentry id="extend-pgxs-extra-clean">
1728+
<varlistentry id="extend-postgres-pgxs-extra-clean">
17241729
<term><varname>EXTRA_CLEAN</varname></term>
17251730
<listitem>
17261731
<para>
@@ -1729,7 +1734,7 @@ include $(PGXS)
17291734
</listitem>
17301735
</varlistentry>
17311736

1732-
<varlistentry id="extend-pgxs-pg-cppflags">
1737+
<varlistentry id="extend-postgres-pgxs-pg-cppflags">
17331738
<term><varname>PG_CPPFLAGS</varname></term>
17341739
<listitem>
17351740
<para>
@@ -1738,7 +1743,7 @@ include $(PGXS)
17381743
</listitem>
17391744
</varlistentry>
17401745

1741-
<varlistentry id="extend-pgxs-pg-cflags">
1746+
<varlistentry id="extend-postgres-pgxs-pg-cflags">
17421747
<term><varname>PG_CFLAGS</varname></term>
17431748
<listitem>
17441749
<para>
@@ -1747,7 +1752,7 @@ include $(PGXS)
17471752
</listitem>
17481753
</varlistentry>
17491754

1750-
<varlistentry id="extend-pgxs-pg-cxxflags">
1755+
<varlistentry id="extend-postgres-pgxs-pg-cxxflags">
17511756
<term><varname>PG_CXXFLAGS</varname></term>
17521757
<listitem>
17531758
<para>
@@ -1756,7 +1761,7 @@ include $(PGXS)
17561761
</listitem>
17571762
</varlistentry>
17581763

1759-
<varlistentry id="extend-pgxs-pg-ldflags">
1764+
<varlistentry id="extend-postgres-pgxs-pg-ldflags">
17601765
<term><varname>PG_LDFLAGS</varname></term>
17611766
<listitem>
17621767
<para>
@@ -1765,7 +1770,7 @@ include $(PGXS)
17651770
</listitem>
17661771
</varlistentry>
17671772

1768-
<varlistentry id="extend-pgxs-pg-libs">
1773+
<varlistentry id="extend-postgres-pgxs-pg-libs">
17691774
<term><varname>PG_LIBS</varname></term>
17701775
<listitem>
17711776
<para>
@@ -1774,7 +1779,7 @@ include $(PGXS)
17741779
</listitem>
17751780
</varlistentry>
17761781

1777-
<varlistentry id="extend-pgxs-shlib-link">
1782+
<varlistentry id="extend-postgres-pgxs-shlib-link">
17781783
<term><varname>SHLIB_LINK</varname></term>
17791784
<listitem>
17801785
<para>
@@ -1783,7 +1788,7 @@ include $(PGXS)
17831788
</listitem>
17841789
</varlistentry>
17851790

1786-
<varlistentry id="extend-pgxs-pg-config">
1791+
<varlistentry id="extend-postgres-pgxs-pg-config">
17871792
<term><varname>PG_CONFIG</varname></term>
17881793
<listitem>
17891794
<para>
@@ -1929,4 +1934,26 @@ make VPATH=/path/to/extension/source/tree install
19291934
</tip>
19301935
</sect1>
19311936

1937+
<sect1 id="extend-postgres-meson">
1938+
<title>postgresql-extension.pc</title>
1939+
1940+
<para>
1941+
When Postgres is built by using meson, it generates
1942+
<literal>postgresql-extension.pc</literal> pkg-config file. Extension
1943+
libraries can use this file like <literal>PGXS</literal>
1944+
(<xref linkend="extend-postgres-pgxs"/>).
1945+
1946+
To use the <literal>postgresql-extension.pc</literal> infrastructure for
1947+
your extension, you must write a simple meson.build file. In the
1948+
meson.build file, you need to include the
1949+
<literal>postgresql-extension.pc</literal> pkg-config file. Here is an
1950+
example that builds an extension module named isbn_issn, consisting of a
1951+
shared library containing some C code, an extension control file, an SQL
1952+
script, an include file (only needed if other modules might need to access
1953+
the extension functions without going via SQL), and a documentation text
1954+
file:
1955+
</para>
1956+
1957+
</sect1>
1958+
19321959
</chapter>

doc/src/sgml/jit.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ SET
223223
of types <literal>C</literal> and <literal>internal</literal>, as well as
224224
operators based on such functions. To do so for functions in extensions,
225225
the definitions of those functions need to be made available.
226-
When using <link linkend="extend-pgxs">PGXS</link> to build an extension
226+
When using <link linkend="extend-postgres-pgxs">PGXS</link> to build an extension
227227
against a server that has been compiled with LLVM JIT support, the
228228
relevant files will be built and installed automatically.
229229
</para>

0 commit comments

Comments
 (0)