跳转到主要内容

plxslt

XSLT procedural language for PostgreSQL

plxslt : XSLT procedural language for PostgreSQL

Overview

ID Extension Package Version Category License Language
3110 plxslt plxslt 0.20140221 LANG PostgreSQL C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-r No Yes No Yes yes no

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PGDG 0.20140221 19 18 17 16 15 plxslt -
RPM PGDG 0.20140221 19 18 17 16 15 plxslt_$v -
DEB PIGSTY 0.20140221 19 18 17 16 15 postgresql-$v-plxslt -
Linux / PG PG19 PG18 PG17 PG16 PG15
el8.x86_64 N/A PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221
el8.aarch64 N/A PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221
el9.x86_64 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221
el9.aarch64 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221
el10.x86_64 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221
el10.aarch64 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221 PGDG 0.20140221
d12.x86_64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
d12.aarch64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
d13.x86_64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
d13.aarch64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
u22.x86_64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
u22.aarch64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
u24.x86_64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
u24.aarch64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
u26.x86_64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
u26.aarch64 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221 PIGSTY 0.20140221
Package Version OS ORG SIZE File URL
plxslt_19 0.20140221 el9.x86_64 pgdg 16.2 KiB plxslt_19-0.20140221-7PGDG.rhel9.9.x86_64.rpm
plxslt_19 0.20140221 el9.aarch64 pgdg 16.0 KiB plxslt_19-0.20140221-7PGDG.rhel9.9.aarch64.rpm
plxslt_19 0.20140221 el10.x86_64 pgdg 16.3 KiB plxslt_19-0.20140221-7PGDG.rhel10.3.x86_64.rpm
plxslt_19 0.20140221 el10.aarch64 pgdg 16.3 KiB plxslt_19-0.20140221-7PGDG.rhel10.3.aarch64.rpm
postgresql-19-plxslt 0.20140221 d12.x86_64 pigsty 13.7 KiB postgresql-19-plxslt_0.20140221-1PGSTY~bookworm_amd64.deb
postgresql-19-plxslt 0.20140221 d12.aarch64 pigsty 13.8 KiB postgresql-19-plxslt_0.20140221-1PGSTY~bookworm_arm64.deb
postgresql-19-plxslt 0.20140221 d13.x86_64 pigsty 13.7 KiB postgresql-19-plxslt_0.20140221-1PGSTY~trixie_amd64.deb
postgresql-19-plxslt 0.20140221 d13.aarch64 pigsty 13.8 KiB postgresql-19-plxslt_0.20140221-1PGSTY~trixie_arm64.deb
postgresql-19-plxslt 0.20140221 u22.x86_64 pigsty 14.3 KiB postgresql-19-plxslt_0.20140221-1PGSTY~jammy_amd64.deb
postgresql-19-plxslt 0.20140221 u22.aarch64 pigsty 14.6 KiB postgresql-19-plxslt_0.20140221-1PGSTY~jammy_arm64.deb
postgresql-19-plxslt 0.20140221 u24.x86_64 pigsty 14.4 KiB postgresql-19-plxslt_0.20140221-1PGSTY~noble_amd64.deb
postgresql-19-plxslt 0.20140221 u24.aarch64 pigsty 14.3 KiB postgresql-19-plxslt_0.20140221-1PGSTY~noble_arm64.deb
postgresql-19-plxslt 0.20140221 u26.x86_64 pigsty 14.5 KiB postgresql-19-plxslt_0.20140221-1PGSTY~resolute_amd64.deb
postgresql-19-plxslt 0.20140221 u26.aarch64 pigsty 14.5 KiB postgresql-19-plxslt_0.20140221-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
plxslt_18 0.20140221 el8.x86_64 pgdg 15.7 KiB plxslt_18-0.20140221-7PGDG.rhel8.10.x86_64.rpm
plxslt_18 0.20140221 el8.x86_64 pgdg 14.7 KiB plxslt_18-0.20140221-1PGDG.rhel8.x86_64.rpm
plxslt_18 0.20140221 el8.aarch64 pgdg 15.8 KiB plxslt_18-0.20140221-7PGDG.rhel8.10.aarch64.rpm
plxslt_18 0.20140221 el8.aarch64 pgdg 14.7 KiB plxslt_18-0.20140221-1PGDG.rhel8.aarch64.rpm
plxslt_18 0.20140221 el9.x86_64 pgdg 16.2 KiB plxslt_18-0.20140221-7PGDG.rhel9.9.x86_64.rpm
plxslt_18 0.20140221 el9.aarch64 pgdg 16.0 KiB plxslt_18-0.20140221-7PGDG.rhel9.9.aarch64.rpm
plxslt_18 0.20140221 el10.x86_64 pgdg 16.3 KiB plxslt_18-0.20140221-7PGDG.rhel10.3.x86_64.rpm
plxslt_18 0.20140221 el10.aarch64 pgdg 16.3 KiB plxslt_18-0.20140221-7PGDG.rhel10.3.aarch64.rpm
plxslt_18 0.20140221 el10.aarch64 pgdg 16.1 KiB plxslt_18-0.20140221-7PGDG.rhel10.2.aarch64.rpm
plxslt_18 0.20140221 el10.aarch64 pgdg 15.2 KiB plxslt_18-0.20140221-3PGDG.rhel10.2.aarch64.rpm
plxslt_18 0.20140221 el10.aarch64 pgdg 15.2 KiB plxslt_18-0.20140221-1PGDG.rhel10.aarch64.rpm
postgresql-18-plxslt 0.20140221 d12.x86_64 pigsty 13.7 KiB postgresql-18-plxslt_0.20140221-1PGSTY~bookworm_amd64.deb
postgresql-18-plxslt 0.20140221 d12.aarch64 pigsty 13.8 KiB postgresql-18-plxslt_0.20140221-1PGSTY~bookworm_arm64.deb
postgresql-18-plxslt 0.20140221 d13.x86_64 pigsty 13.7 KiB postgresql-18-plxslt_0.20140221-1PGSTY~trixie_amd64.deb
postgresql-18-plxslt 0.20140221 d13.aarch64 pigsty 13.8 KiB postgresql-18-plxslt_0.20140221-1PGSTY~trixie_arm64.deb
postgresql-18-plxslt 0.20140221 u22.x86_64 pigsty 14.2 KiB postgresql-18-plxslt_0.20140221-1PGSTY~jammy_amd64.deb
postgresql-18-plxslt 0.20140221 u22.aarch64 pigsty 14.5 KiB postgresql-18-plxslt_0.20140221-1PGSTY~jammy_arm64.deb
postgresql-18-plxslt 0.20140221 u24.x86_64 pigsty 14.4 KiB postgresql-18-plxslt_0.20140221-1PGSTY~noble_amd64.deb
postgresql-18-plxslt 0.20140221 u24.aarch64 pigsty 14.3 KiB postgresql-18-plxslt_0.20140221-1PGSTY~noble_arm64.deb
postgresql-18-plxslt 0.20140221 u26.x86_64 pigsty 14.5 KiB postgresql-18-plxslt_0.20140221-1PGSTY~resolute_amd64.deb
postgresql-18-plxslt 0.20140221 u26.aarch64 pigsty 14.5 KiB postgresql-18-plxslt_0.20140221-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
plxslt_17 0.20140221 el8.x86_64 pgdg 15.7 KiB plxslt_17-0.20140221-7PGDG.rhel8.10.x86_64.rpm
plxslt_17 0.20140221 el8.x86_64 pgdg 14.7 KiB plxslt_17-0.20140221-1PGDG.rhel8.x86_64.rpm
plxslt_17 0.20140221 el8.aarch64 pgdg 15.8 KiB plxslt_17-0.20140221-7PGDG.rhel8.10.aarch64.rpm
plxslt_17 0.20140221 el8.aarch64 pgdg 14.7 KiB plxslt_17-0.20140221-1PGDG.rhel8.aarch64.rpm
plxslt_17 0.20140221 el9.x86_64 pgdg 16.2 KiB plxslt_17-0.20140221-7PGDG.rhel9.9.x86_64.rpm
plxslt_17 0.20140221 el9.aarch64 pgdg 16.1 KiB plxslt_17-0.20140221-7PGDG.rhel9.9.aarch64.rpm
plxslt_17 0.20140221 el10.x86_64 pgdg 16.3 KiB plxslt_17-0.20140221-7PGDG.rhel10.3.x86_64.rpm
plxslt_17 0.20140221 el10.aarch64 pgdg 16.3 KiB plxslt_17-0.20140221-7PGDG.rhel10.3.aarch64.rpm
plxslt_17 0.20140221 el10.aarch64 pgdg 16.1 KiB plxslt_17-0.20140221-7PGDG.rhel10.2.aarch64.rpm
plxslt_17 0.20140221 el10.aarch64 pgdg 15.2 KiB plxslt_17-0.20140221-3PGDG.rhel10.2.aarch64.rpm
plxslt_17 0.20140221 el10.aarch64 pgdg 15.2 KiB plxslt_17-0.20140221-1PGDG.rhel10.aarch64.rpm
postgresql-17-plxslt 0.20140221 d12.x86_64 pigsty 13.7 KiB postgresql-17-plxslt_0.20140221-1PGSTY~bookworm_amd64.deb
postgresql-17-plxslt 0.20140221 d12.aarch64 pigsty 13.7 KiB postgresql-17-plxslt_0.20140221-1PGSTY~bookworm_arm64.deb
postgresql-17-plxslt 0.20140221 d13.x86_64 pigsty 13.7 KiB postgresql-17-plxslt_0.20140221-1PGSTY~trixie_amd64.deb
postgresql-17-plxslt 0.20140221 d13.aarch64 pigsty 13.7 KiB postgresql-17-plxslt_0.20140221-1PGSTY~trixie_arm64.deb
postgresql-17-plxslt 0.20140221 u22.x86_64 pigsty 15.5 KiB postgresql-17-plxslt_0.20140221-1PGSTY~jammy_amd64.deb
postgresql-17-plxslt 0.20140221 u22.aarch64 pigsty 15.8 KiB postgresql-17-plxslt_0.20140221-1PGSTY~jammy_arm64.deb
postgresql-17-plxslt 0.20140221 u24.x86_64 pigsty 14.4 KiB postgresql-17-plxslt_0.20140221-1PGSTY~noble_amd64.deb
postgresql-17-plxslt 0.20140221 u24.aarch64 pigsty 14.3 KiB postgresql-17-plxslt_0.20140221-1PGSTY~noble_arm64.deb
postgresql-17-plxslt 0.20140221 u26.x86_64 pigsty 14.5 KiB postgresql-17-plxslt_0.20140221-1PGSTY~resolute_amd64.deb
postgresql-17-plxslt 0.20140221 u26.aarch64 pigsty 14.4 KiB postgresql-17-plxslt_0.20140221-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
plxslt_16 0.20140221 el8.x86_64 pgdg 15.7 KiB plxslt_16-0.20140221-7PGDG.rhel8.10.x86_64.rpm
plxslt_16 0.20140221 el8.x86_64 pgdg 14.7 KiB plxslt_16-0.20140221-1PGDG.rhel8.x86_64.rpm
plxslt_16 0.20140221 el8.aarch64 pgdg 15.8 KiB plxslt_16-0.20140221-7PGDG.rhel8.10.aarch64.rpm
plxslt_16 0.20140221 el8.aarch64 pgdg 14.7 KiB plxslt_16-0.20140221-1PGDG.rhel8.aarch64.rpm
plxslt_16 0.20140221 el9.x86_64 pgdg 16.2 KiB plxslt_16-0.20140221-7PGDG.rhel9.9.x86_64.rpm
plxslt_16 0.20140221 el9.aarch64 pgdg 16.0 KiB plxslt_16-0.20140221-7PGDG.rhel9.9.aarch64.rpm
plxslt_16 0.20140221 el10.x86_64 pgdg 16.3 KiB plxslt_16-0.20140221-7PGDG.rhel10.3.x86_64.rpm
plxslt_16 0.20140221 el10.aarch64 pgdg 16.3 KiB plxslt_16-0.20140221-7PGDG.rhel10.3.aarch64.rpm
plxslt_16 0.20140221 el10.aarch64 pgdg 16.1 KiB plxslt_16-0.20140221-7PGDG.rhel10.2.aarch64.rpm
plxslt_16 0.20140221 el10.aarch64 pgdg 15.2 KiB plxslt_16-0.20140221-3PGDG.rhel10.2.aarch64.rpm
plxslt_16 0.20140221 el10.aarch64 pgdg 15.2 KiB plxslt_16-0.20140221-1PGDG.rhel10.aarch64.rpm
postgresql-16-plxslt 0.20140221 d12.x86_64 pigsty 13.7 KiB postgresql-16-plxslt_0.20140221-1PGSTY~bookworm_amd64.deb
postgresql-16-plxslt 0.20140221 d12.aarch64 pigsty 13.7 KiB postgresql-16-plxslt_0.20140221-1PGSTY~bookworm_arm64.deb
postgresql-16-plxslt 0.20140221 d13.x86_64 pigsty 13.7 KiB postgresql-16-plxslt_0.20140221-1PGSTY~trixie_amd64.deb
postgresql-16-plxslt 0.20140221 d13.aarch64 pigsty 13.7 KiB postgresql-16-plxslt_0.20140221-1PGSTY~trixie_arm64.deb
postgresql-16-plxslt 0.20140221 u22.x86_64 pigsty 15.5 KiB postgresql-16-plxslt_0.20140221-1PGSTY~jammy_amd64.deb
postgresql-16-plxslt 0.20140221 u22.aarch64 pigsty 15.8 KiB postgresql-16-plxslt_0.20140221-1PGSTY~jammy_arm64.deb
postgresql-16-plxslt 0.20140221 u24.x86_64 pigsty 14.4 KiB postgresql-16-plxslt_0.20140221-1PGSTY~noble_amd64.deb
postgresql-16-plxslt 0.20140221 u24.aarch64 pigsty 14.3 KiB postgresql-16-plxslt_0.20140221-1PGSTY~noble_arm64.deb
postgresql-16-plxslt 0.20140221 u26.x86_64 pigsty 14.5 KiB postgresql-16-plxslt_0.20140221-1PGSTY~resolute_amd64.deb
postgresql-16-plxslt 0.20140221 u26.aarch64 pigsty 14.5 KiB postgresql-16-plxslt_0.20140221-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
plxslt_15 0.20140221 el8.x86_64 pgdg 15.7 KiB plxslt_15-0.20140221-7PGDG.rhel8.10.x86_64.rpm
plxslt_15 0.20140221 el8.x86_64 pgdg 14.7 KiB plxslt_15-0.20140221-1PGDG.rhel8.x86_64.rpm
plxslt_15 0.20140221 el8.aarch64 pgdg 15.8 KiB plxslt_15-0.20140221-7PGDG.rhel8.10.aarch64.rpm
plxslt_15 0.20140221 el8.aarch64 pgdg 14.7 KiB plxslt_15-0.20140221-1PGDG.rhel8.aarch64.rpm
plxslt_15 0.20140221 el9.x86_64 pgdg 16.2 KiB plxslt_15-0.20140221-7PGDG.rhel9.9.x86_64.rpm
plxslt_15 0.20140221 el9.aarch64 pgdg 16.1 KiB plxslt_15-0.20140221-7PGDG.rhel9.9.aarch64.rpm
plxslt_15 0.20140221 el10.x86_64 pgdg 16.3 KiB plxslt_15-0.20140221-7PGDG.rhel10.3.x86_64.rpm
plxslt_15 0.20140221 el10.aarch64 pgdg 16.3 KiB plxslt_15-0.20140221-7PGDG.rhel10.3.aarch64.rpm
plxslt_15 0.20140221 el10.aarch64 pgdg 16.1 KiB plxslt_15-0.20140221-7PGDG.rhel10.2.aarch64.rpm
plxslt_15 0.20140221 el10.aarch64 pgdg 15.2 KiB plxslt_15-0.20140221-3PGDG.rhel10.2.aarch64.rpm
plxslt_15 0.20140221 el10.aarch64 pgdg 15.2 KiB plxslt_15-0.20140221-1PGDG.rhel10.aarch64.rpm
postgresql-15-plxslt 0.20140221 d12.x86_64 pigsty 13.7 KiB postgresql-15-plxslt_0.20140221-1PGSTY~bookworm_amd64.deb
postgresql-15-plxslt 0.20140221 d12.aarch64 pigsty 13.7 KiB postgresql-15-plxslt_0.20140221-1PGSTY~bookworm_arm64.deb
postgresql-15-plxslt 0.20140221 d13.x86_64 pigsty 13.7 KiB postgresql-15-plxslt_0.20140221-1PGSTY~trixie_amd64.deb
postgresql-15-plxslt 0.20140221 d13.aarch64 pigsty 13.7 KiB postgresql-15-plxslt_0.20140221-1PGSTY~trixie_arm64.deb
postgresql-15-plxslt 0.20140221 u22.x86_64 pigsty 15.5 KiB postgresql-15-plxslt_0.20140221-1PGSTY~jammy_amd64.deb
postgresql-15-plxslt 0.20140221 u22.aarch64 pigsty 15.8 KiB postgresql-15-plxslt_0.20140221-1PGSTY~jammy_arm64.deb
postgresql-15-plxslt 0.20140221 u24.x86_64 pigsty 14.4 KiB postgresql-15-plxslt_0.20140221-1PGSTY~noble_amd64.deb
postgresql-15-plxslt 0.20140221 u24.aarch64 pigsty 14.3 KiB postgresql-15-plxslt_0.20140221-1PGSTY~noble_arm64.deb
postgresql-15-plxslt 0.20140221 u26.x86_64 pigsty 14.5 KiB postgresql-15-plxslt_0.20140221-1PGSTY~resolute_amd64.deb
postgresql-15-plxslt 0.20140221 u26.aarch64 pigsty 14.5 KiB postgresql-15-plxslt_0.20140221-1PGSTY~resolute_arm64.deb

Source

pig build pkg plxslt;		# build deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install plxslt;		# install via package name, for the active PG version

pig install plxslt -v 19;   # install for PG 19
pig install plxslt -v 18;   # install for PG 18
pig install plxslt -v 17;   # install for PG 17
pig install plxslt -v 16;   # install for PG 16
pig install plxslt -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION plxslt;

Usage

plxslt: XSLT procedural language for PostgreSQL

plxslt enables writing PostgreSQL functions as XSLT stylesheets for transforming XML data.

CREATE EXTENSION plxslt;

Create XSLT Functions

The function body is an XSLT stylesheet. The first parameter must be of type xml and receives the input document:

CREATE FUNCTION extract_title(xml) RETURNS xml AS $$
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <xsl:value-of select="//title"/>
  </xsl:template>
</xsl:stylesheet>
$$ LANGUAGE xslt;

SELECT extract_title('<doc><title>Hello World</title></doc>'::xml);

Return Types

The return type must match the stylesheet’s output method:

Output Method Return Type
xml xml
text text or varchar
html text or varchar

Passing Parameters

Additional function parameters beyond the first xml parameter are passed as XSL stylesheet parameters:

CREATE FUNCTION transform_with_param(xml, text) RETURNS xml AS $$
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:param name="arg2"/>
  <xsl:template match="/">
    <result>
      <xsl:value-of select="$arg2"/>
    </result>
  </xsl:template>
</xsl:stylesheet>
$$ LANGUAGE xslt;

Limitations

  • First parameter must be xml type
  • Triggers are not supported
  • Only XSLT 1.0 transformations are supported (via libxslt)

表格阅读器