Description


The installer is pgxls_init.sql file that creates pgxls schema with the necessary procedures.
The installation consists in executing it in the psql terminal client or SQL manager, for example:

psql -d mydb -f pgxls_init.sql

Download SQL
pgxls_init.sql

Also possible download zip archive with documentation, examples, extension, install and uninstall scripts.

Download zip
pgxls.zip

To uninstall tool, need to drop pgxls schema, for example:
psql -d mydb -c "drop schema if exists pgxls cascade"


Command line

For batch use, installation is carried out in command line using psql, download and execute pgxls_init.sql file
wget -O - https://pgxls.org/files/download/pgxls_init.sql | psql -d [database]

Installation example in test database
[postgres@pgsuite ~]$ wget -O - https://pgxls.org/files/download/pgxls_init.sql | psql -d test
--2023-07-27 20:32:20--  https://pgxls.org/files/download/pgxls_init.sql
Resolving pgxls.org (pgxls.org)... 194.67.205.60
Connecting to pgxls.org (pgxls.org)|194.67.205.60|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65556 (64K) [application/octet-stream]
Saving to: ‘STDOUT’

100%[============================================================>] 65,556      --.-K/s   in 0.002s

2023-07-27 20:32:20 (39.4 MB/s) - written to stdout [65556/65556]

CREATE SCHEMA
CREATE FUNCTION
DO
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE PROCEDURE
CREATE FUNCTION
CREATE PROCEDURE
DO
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
DO
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE FUNCTION
CREATE FUNCTION
CREATE PROCEDURE
CREATE FUNCTION
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE PROCEDURE
CREATE FUNCTION
CREATE PROCEDURE
CREATE PROCEDURE
GRANT
GRANT
GRANT


Extension

To install tool as an extension, unpack pgxls_extension.tar archive into the [sharedir]/extension directory of the postgres installation and create extension, for example (run as root):
su - postgres -c "pg_config --sharedir"
tar xf pgxls_extension.tar -C /usr/pgsql-14/share/extension
psql -U postgres -d mydb -c "create extension pgxls"

Installation example in test database
[root@pgsuite ~]# wget -O - https://pgxls.org/files/download/pgxls_extension.tar | tar x -C `su - postgres -c "pg_config --sharedir"`/extension
--2024-08-14 20:26:22--  https://pgxls.org/files/download/pgxls_extension.tar
Resolving pgxls.org (pgxls.org)... 194.67.205.60
Connecting to pgxls.org (pgxls.org)|194.67.205.60|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71680 (70K) [application/octet-stream]
Saving to: ‘STDOUT’

100%[====================================================================================================>] 71,680      --.-K/s   in 0.001s

2024-08-14 20:26:22 (82.8 MB/s) - written to stdout [71680/71680]


[root@pgsuite ~]# psql -U postgres -d test -c "create extension pgxls"
CREATE EXTENSION


Privileges

By default, privileges to use pgxls schema and its procedures are granted to role public (all users).
If need to grant privileges only to developers, you can use an SQL scriptpgxls_dev_grants.sql with a roles variable, for example:
psql -d -mydb -f pgxls_dev_grants.sql -v roles=developers

GitHub

The source code is upload in GitHub repository


License

PGXLS is released under the MIT License (open and free software license).

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.