2022-04-24 19:46:24 +02:00
|
|
|
# $NetBSD: pgsql.buildlink3.mk,v 1.58 2022/04/24 17:46:24 tnn Exp $
|
2006-10-18 22:48:58 +02:00
|
|
|
#
|
|
|
|
# User-settable variables:
|
|
|
|
#
|
|
|
|
# PGSQL_VERSION_DEFAULT
|
|
|
|
#
|
|
|
|
# Package-settable variables:
|
|
|
|
#
|
|
|
|
# PGSQL_VERSIONS_ACCEPTED
|
|
|
|
#
|
|
|
|
# Variables set by this file:
|
|
|
|
#
|
|
|
|
# PG_LIB_EXT
|
|
|
|
# PGSQL_TYPE
|
|
|
|
# PGPKGSRCDIR
|
2020-10-20 23:53:31 +02:00
|
|
|
# PGSQL_VERSION
|
2004-07-23 23:40:00 +02:00
|
|
|
|
|
|
|
.if !defined(PGVERSION_MK)
|
|
|
|
PGVERSION_MK= defined
|
|
|
|
|
2007-06-06 14:40:05 +02:00
|
|
|
_VARGROUPS+= pgsql
|
|
|
|
_USER_VARS.pgsql= PGSQL_VERSION_DEFAULT
|
|
|
|
_PKG_VARS.pgsql= PGSQL_VERSIONS_ACCEPTED
|
|
|
|
_SYS_VARS.pgsql= PG_LIB_EXT PGSQL_TYPE PGPKGSRCDIR
|
|
|
|
|
2004-07-23 23:40:00 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2021-06-28 15:11:16 +02:00
|
|
|
PGSQL_VERSION_DEFAULT?= 13
|
2022-04-24 19:46:24 +02:00
|
|
|
PGSQL_VERSIONS_ACCEPTED?= 14 13 12 11 10
|
2004-07-23 23:40:00 +02:00
|
|
|
|
|
|
|
# transform the list into individual variables
|
|
|
|
.for pv in ${PGSQL_VERSIONS_ACCEPTED}
|
|
|
|
_PGSQL_VERSION_${pv}_OK= yes
|
|
|
|
.endfor
|
|
|
|
|
2017-06-01 15:30:24 +02:00
|
|
|
.if ${SHLIB_TYPE} == "dylib"
|
2005-04-11 22:35:24 +02:00
|
|
|
PG_LIB_EXT=dylib
|
|
|
|
.else
|
|
|
|
PG_LIB_EXT=so
|
|
|
|
.endif
|
|
|
|
|
2004-07-23 23:40:00 +02:00
|
|
|
# check what is installed
|
2005-04-11 22:35:24 +02:00
|
|
|
.if ${OPSYS} == "Darwin"
|
postgresql14: added version 14.0
PostgreSQL 14 contains many new features and enhancements, including:
Stored procedures can now return data via OUT parameters.
The SQL-standard SEARCH and CYCLE options for common table expressions have been implemented.
Subscripting can now be applied to any data type for which it is a useful notation, not only arrays. In this release, the jsonb and hstore types have gained subscripting operators.
Range types have been extended by adding multiranges, allowing representation of noncontiguous data ranges.
Numerous performance improvements have been made for parallel queries, heavily-concurrent workloads, partitioned tables, logical replication, and vacuuming.
B-tree index updates are managed more efficiently, reducing index bloat.
VACUUM automatically becomes more aggressive, and skips inessential cleanup, if the database starts to approach a transaction ID wraparound condition.
Extended statistics can now be collected on expressions, allowing better planning results for complex queries.
libpq now has the ability to pipeline multiple queries, which can boost throughput over high-latency connections.
2021-10-08 12:23:43 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.6.14.dylib)
|
|
|
|
_PGSQL_VERSION_14_INSTALLED= yes
|
|
|
|
. endif
|
2020-10-18 11:24:02 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.6.13.dylib)
|
|
|
|
_PGSQL_VERSION_13_INSTALLED= yes
|
|
|
|
. endif
|
postgresql12: added version 12.0
Release 12:
General performance improvements, including:
* Optimizations to space utilization and read/write performance for B-tree indexes
* Partitioning performance enhancements, including improved query performance on tables with thousands of partitions, improved insertion performance with INSERT and COPY, and the ability to execute ALTER TABLE ATTACH PARTITION without blocking queries
* Automatic (but overridable) inlining of common table expressions (CTEs)
* Reduction of WAL overhead for creation of GiST, GIN, and SP-GiST indexes
* Support for covering GiST indexes, via the INCLUDE clause
* Multi-column most-common-value (MCV) statistics can be defined via CREATE STATISTICS, to support better plans for queries that test several non-uniformly-distributed columns
Enhancements to administrative functionality, including:
* REINDEX CONCURRENTLY can rebuild an index without blocking writes to its table
* pg_checksums can enable/disable page checksums (used for detecting data corruption) in an offline cluster
* Progress reporting statistics for CREATE INDEX, REINDEX, CLUSTER, VACUUM FULL, and pg_checksums
Support for the SQL/JSON path language
Stored generated columns
Nondeterministic ICU collations, enabling case-insensitive and accent-insensitive grouping and ordering
New authentication features, including:
* Encryption of TCP/IP connections when using GSSAPI authentication
* Discovery of LDAP servers using DNS SRV records
* Multi-factor authentication, using the clientcert=verify-full option combined with an additional authentication method in pg_hba.conf
2019-10-07 21:21:48 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.6.12.dylib)
|
|
|
|
_PGSQL_VERSION_12_INSTALLED= yes
|
|
|
|
. endif
|
2018-10-23 18:02:51 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.6.11.dylib)
|
|
|
|
_PGSQL_VERSION_11_INSTALLED= yes
|
|
|
|
. endif
|
2017-10-23 22:34:27 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.6.10.dylib)
|
|
|
|
_PGSQL_VERSION_10_INSTALLED= yes
|
|
|
|
. endif
|
2005-04-11 22:35:24 +02:00
|
|
|
.else
|
postgresql14: added version 14.0
PostgreSQL 14 contains many new features and enhancements, including:
Stored procedures can now return data via OUT parameters.
The SQL-standard SEARCH and CYCLE options for common table expressions have been implemented.
Subscripting can now be applied to any data type for which it is a useful notation, not only arrays. In this release, the jsonb and hstore types have gained subscripting operators.
Range types have been extended by adding multiranges, allowing representation of noncontiguous data ranges.
Numerous performance improvements have been made for parallel queries, heavily-concurrent workloads, partitioned tables, logical replication, and vacuuming.
B-tree index updates are managed more efficiently, reducing index bloat.
VACUUM automatically becomes more aggressive, and skips inessential cleanup, if the database starts to approach a transaction ID wraparound condition.
Extended statistics can now be collected on expressions, allowing better planning results for complex queries.
libpq now has the ability to pipeline multiple queries, which can boost throughput over high-latency connections.
2021-10-08 12:23:43 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.so.6.14)
|
|
|
|
_PGSQL_VERSION_14_INSTALLED= yes
|
|
|
|
. endif
|
2020-10-18 11:24:02 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.so.6.13)
|
|
|
|
_PGSQL_VERSION_13_INSTALLED= yes
|
|
|
|
. endif
|
postgresql12: added version 12.0
Release 12:
General performance improvements, including:
* Optimizations to space utilization and read/write performance for B-tree indexes
* Partitioning performance enhancements, including improved query performance on tables with thousands of partitions, improved insertion performance with INSERT and COPY, and the ability to execute ALTER TABLE ATTACH PARTITION without blocking queries
* Automatic (but overridable) inlining of common table expressions (CTEs)
* Reduction of WAL overhead for creation of GiST, GIN, and SP-GiST indexes
* Support for covering GiST indexes, via the INCLUDE clause
* Multi-column most-common-value (MCV) statistics can be defined via CREATE STATISTICS, to support better plans for queries that test several non-uniformly-distributed columns
Enhancements to administrative functionality, including:
* REINDEX CONCURRENTLY can rebuild an index without blocking writes to its table
* pg_checksums can enable/disable page checksums (used for detecting data corruption) in an offline cluster
* Progress reporting statistics for CREATE INDEX, REINDEX, CLUSTER, VACUUM FULL, and pg_checksums
Support for the SQL/JSON path language
Stored generated columns
Nondeterministic ICU collations, enabling case-insensitive and accent-insensitive grouping and ordering
New authentication features, including:
* Encryption of TCP/IP connections when using GSSAPI authentication
* Discovery of LDAP servers using DNS SRV records
* Multi-factor authentication, using the clientcert=verify-full option combined with an additional authentication method in pg_hba.conf
2019-10-07 21:21:48 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.so.6.12)
|
|
|
|
_PGSQL_VERSION_12_INSTALLED= yes
|
|
|
|
. endif
|
2018-10-23 18:02:51 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.so.6.11)
|
|
|
|
_PGSQL_VERSION_11_INSTALLED= yes
|
|
|
|
. endif
|
2017-10-23 22:34:27 +02:00
|
|
|
. if exists(${LOCALBASE}/lib/libecpg.so.6.10)
|
|
|
|
_PGSQL_VERSION_10_INSTALLED= yes
|
|
|
|
. endif
|
2005-04-11 22:35:24 +02:00
|
|
|
.endif
|
2004-07-23 23:40:00 +02:00
|
|
|
|
|
|
|
# if a version is explicitely required, take it
|
|
|
|
.if defined(PGSQL_VERSION_REQD)
|
|
|
|
_PGSQL_VERSION= ${PGSQL_VERSION_REQD}
|
|
|
|
.endif
|
|
|
|
# if the default is already installed, it is first choice
|
|
|
|
.if !defined(_PGSQL_VERSION)
|
|
|
|
.if defined(_PGSQL_VERSION_${PGSQL_VERSION_DEFAULT}_OK)
|
|
|
|
.if defined(_PGSQL_VERSION_${PGSQL_VERSION_DEFAULT}_INSTALLED)
|
|
|
|
_PGSQL_VERSION= ${PGSQL_VERSION_DEFAULT}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
# prefer an already installed version, in order of "accepted"
|
|
|
|
.if !defined(_PGSQL_VERSION)
|
|
|
|
.for pv in ${PGSQL_VERSIONS_ACCEPTED}
|
|
|
|
.if defined(_PGSQL_VERSION_${pv}_INSTALLED)
|
|
|
|
_PGSQL_VERSION?= ${pv}
|
|
|
|
.else
|
|
|
|
# keep information as last resort - see below
|
|
|
|
_PGSQL_VERSION_FIRSTACCEPTED?= ${pv}
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
# if the default is OK for the addon pkg, take this
|
|
|
|
.if !defined(_PGSQL_VERSION)
|
|
|
|
.if defined(_PGSQL_VERSION_${PGSQL_VERSION_DEFAULT}_OK)
|
|
|
|
_PGSQL_VERSION= ${PGSQL_VERSION_DEFAULT}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
# take the first one accepted by the package
|
|
|
|
.if !defined(_PGSQL_VERSION)
|
|
|
|
_PGSQL_VERSION= ${_PGSQL_VERSION_FIRSTACCEPTED}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# set variables for the version we decided to use:
|
postgresql14: added version 14.0
PostgreSQL 14 contains many new features and enhancements, including:
Stored procedures can now return data via OUT parameters.
The SQL-standard SEARCH and CYCLE options for common table expressions have been implemented.
Subscripting can now be applied to any data type for which it is a useful notation, not only arrays. In this release, the jsonb and hstore types have gained subscripting operators.
Range types have been extended by adding multiranges, allowing representation of noncontiguous data ranges.
Numerous performance improvements have been made for parallel queries, heavily-concurrent workloads, partitioned tables, logical replication, and vacuuming.
B-tree index updates are managed more efficiently, reducing index bloat.
VACUUM automatically becomes more aggressive, and skips inessential cleanup, if the database starts to approach a transaction ID wraparound condition.
Extended statistics can now be collected on expressions, allowing better planning results for complex queries.
libpq now has the ability to pipeline multiple queries, which can boost throughput over high-latency connections.
2021-10-08 12:23:43 +02:00
|
|
|
.if ${_PGSQL_VERSION} == "14"
|
|
|
|
PGSQL_TYPE= postgresql14-client
|
|
|
|
PGPKGSRCDIR= ../../databases/postgresql14-client
|
|
|
|
.elif ${_PGSQL_VERSION} == "13"
|
2020-10-18 11:24:02 +02:00
|
|
|
PGSQL_TYPE= postgresql13-client
|
|
|
|
PGPKGSRCDIR= ../../databases/postgresql13-client
|
|
|
|
.elif ${_PGSQL_VERSION} == "12"
|
postgresql12: added version 12.0
Release 12:
General performance improvements, including:
* Optimizations to space utilization and read/write performance for B-tree indexes
* Partitioning performance enhancements, including improved query performance on tables with thousands of partitions, improved insertion performance with INSERT and COPY, and the ability to execute ALTER TABLE ATTACH PARTITION without blocking queries
* Automatic (but overridable) inlining of common table expressions (CTEs)
* Reduction of WAL overhead for creation of GiST, GIN, and SP-GiST indexes
* Support for covering GiST indexes, via the INCLUDE clause
* Multi-column most-common-value (MCV) statistics can be defined via CREATE STATISTICS, to support better plans for queries that test several non-uniformly-distributed columns
Enhancements to administrative functionality, including:
* REINDEX CONCURRENTLY can rebuild an index without blocking writes to its table
* pg_checksums can enable/disable page checksums (used for detecting data corruption) in an offline cluster
* Progress reporting statistics for CREATE INDEX, REINDEX, CLUSTER, VACUUM FULL, and pg_checksums
Support for the SQL/JSON path language
Stored generated columns
Nondeterministic ICU collations, enabling case-insensitive and accent-insensitive grouping and ordering
New authentication features, including:
* Encryption of TCP/IP connections when using GSSAPI authentication
* Discovery of LDAP servers using DNS SRV records
* Multi-factor authentication, using the clientcert=verify-full option combined with an additional authentication method in pg_hba.conf
2019-10-07 21:21:48 +02:00
|
|
|
PGSQL_TYPE= postgresql12-client
|
|
|
|
PGPKGSRCDIR= ../../databases/postgresql12-client
|
|
|
|
.elif ${_PGSQL_VERSION} == "11"
|
2018-10-23 18:02:51 +02:00
|
|
|
PGSQL_TYPE= postgresql11-client
|
|
|
|
PGPKGSRCDIR= ../../databases/postgresql11-client
|
|
|
|
.elif ${_PGSQL_VERSION} == "10"
|
2017-10-23 22:34:27 +02:00
|
|
|
PGSQL_TYPE= postgresql10-client
|
|
|
|
PGPKGSRCDIR= ../../databases/postgresql10-client
|
2004-07-23 23:40:00 +02:00
|
|
|
.else
|
|
|
|
# force an error
|
2005-03-17 22:44:58 +01:00
|
|
|
PGSQL_TYPE= none
|
2007-02-10 09:59:07 +01:00
|
|
|
PKG_FAIL_REASON+= "${_PGSQL_VERSION} is not a valid package"
|
2004-07-23 23:40:00 +02:00
|
|
|
.endif
|
|
|
|
|
2005-03-24 18:46:00 +01:00
|
|
|
.include "${PGPKGSRCDIR}/buildlink3.mk"
|
2005-03-17 22:44:58 +01:00
|
|
|
PGSQL_PREFIX= ${BUILDLINK_PREFIX.${PGSQL_TYPE}}
|
2004-07-23 23:40:00 +02:00
|
|
|
|
2005-05-24 12:01:25 +02:00
|
|
|
PGSQL_VERSION= ${_PGSQL_VERSION}
|
|
|
|
|
2004-07-23 23:40:00 +02:00
|
|
|
.endif # PGVERSION_MK
|