Remove useless whitespace at end of lines
This commit is contained in:
parent
44475e782f
commit
fc946c39ae
2
README
2
README
|
@ -1,6 +1,6 @@
|
||||||
PostgreSQL Database Management System
|
PostgreSQL Database Management System
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
This directory contains the source code distribution of the PostgreSQL
|
This directory contains the source code distribution of the PostgreSQL
|
||||||
database management system.
|
database management system.
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
dnl @synopsis AC_FUNC_ACCEPT_ARGTYPES
|
dnl @synopsis AC_FUNC_ACCEPT_ARGTYPES
|
||||||
dnl
|
dnl
|
||||||
dnl Checks the data types of the three arguments to accept(). Results are
|
dnl Checks the data types of the three arguments to accept(). Results are
|
||||||
dnl placed into the symbols ACCEPT_TYPE_RETURN and ACCEPT_TYPE_ARG[123],
|
dnl placed into the symbols ACCEPT_TYPE_RETURN and ACCEPT_TYPE_ARG[123],
|
||||||
dnl consistent with the following example:
|
dnl consistent with the following example:
|
||||||
dnl
|
dnl
|
||||||
dnl #define ACCEPT_TYPE_RETURN int
|
dnl #define ACCEPT_TYPE_RETURN int
|
||||||
|
@ -37,7 +37,7 @@ dnl
|
||||||
# which is *not* 'socklen_t *'). If we detect that, then we assume
|
# which is *not* 'socklen_t *'). If we detect that, then we assume
|
||||||
# 'int' as the result, because that ought to work best.
|
# 'int' as the result, because that ought to work best.
|
||||||
#
|
#
|
||||||
# On Win32, accept() returns 'unsigned int PASCAL'
|
# On Win32, accept() returns 'unsigned int PASCAL'
|
||||||
|
|
||||||
AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
|
AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
|
||||||
[AC_MSG_CHECKING([types of arguments for accept()])
|
[AC_MSG_CHECKING([types of arguments for accept()])
|
||||||
|
|
|
@ -90,7 +90,7 @@ dnl values. But we only want it to appear once in the help. We achieve
|
||||||
dnl that by making the help string look the same, which is why we need to
|
dnl that by making the help string look the same, which is why we need to
|
||||||
dnl save the default that was passed in previously.
|
dnl save the default that was passed in previously.
|
||||||
m4_define([_pgac_helpdefault], m4_ifdef([pgac_defined_$1_$2_bool], [m4_defn([pgac_defined_$1_$2_bool])], [$3]))dnl
|
m4_define([_pgac_helpdefault], m4_ifdef([pgac_defined_$1_$2_bool], [m4_defn([pgac_defined_$1_$2_bool])], [$3]))dnl
|
||||||
PGAC_ARG([$1], [$2], [m4_if(_pgac_helpdefault, yes, -)], [$4], [$5], [$6],
|
PGAC_ARG([$1], [$2], [m4_if(_pgac_helpdefault, yes, -)], [$4], [$5], [$6],
|
||||||
[AC_MSG_ERROR([no argument expected for --$1-$2 option])],
|
[AC_MSG_ERROR([no argument expected for --$1-$2 option])],
|
||||||
[m4_case([$3],
|
[m4_case([$3],
|
||||||
yes, [pgac_arg_to_variable([$1], [$2])=yes
|
yes, [pgac_arg_to_variable([$1], [$2])=yes
|
||||||
|
|
28
configure.in
28
configure.in
|
@ -230,7 +230,7 @@ AC_SUBST(enable_coverage)
|
||||||
#
|
#
|
||||||
PGAC_ARG_BOOL(enable, dtrace, no,
|
PGAC_ARG_BOOL(enable, dtrace, no,
|
||||||
[build with DTrace support],
|
[build with DTrace support],
|
||||||
[AC_DEFINE([ENABLE_DTRACE], 1,
|
[AC_DEFINE([ENABLE_DTRACE], 1,
|
||||||
[Define to 1 to enable DTrace support. (--enable-dtrace)])
|
[Define to 1 to enable DTrace support. (--enable-dtrace)])
|
||||||
AC_CHECK_PROGS(DTRACE, dtrace)
|
AC_CHECK_PROGS(DTRACE, dtrace)
|
||||||
if test -z "$DTRACE"; then
|
if test -z "$DTRACE"; then
|
||||||
|
@ -262,14 +262,14 @@ AC_DEFINE_UNQUOTED([BLCKSZ], ${BLCKSZ}, [
|
||||||
can set it bigger if you need bigger tuples (although TOAST should
|
can set it bigger if you need bigger tuples (although TOAST should
|
||||||
reduce the need to have large tuples, since fields can be spread
|
reduce the need to have large tuples, since fields can be spread
|
||||||
across multiple tuples).
|
across multiple tuples).
|
||||||
|
|
||||||
BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ
|
BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ
|
||||||
is currently 2^15 (32768). This is determined by the 15-bit widths
|
is currently 2^15 (32768). This is determined by the 15-bit widths
|
||||||
of the lp_off and lp_len fields in ItemIdData (see
|
of the lp_off and lp_len fields in ItemIdData (see
|
||||||
include/storage/itemid.h).
|
include/storage/itemid.h).
|
||||||
|
|
||||||
Changing BLCKSZ requires an initdb.
|
Changing BLCKSZ requires an initdb.
|
||||||
])
|
])
|
||||||
|
|
||||||
#
|
#
|
||||||
# Relation segment size
|
# Relation segment size
|
||||||
|
@ -288,7 +288,7 @@ AC_DEFINE_UNQUOTED([RELSEG_SIZE], ${RELSEG_SIZE}, [
|
||||||
RELSEG_SIZE is the maximum number of blocks allowed in one disk file.
|
RELSEG_SIZE is the maximum number of blocks allowed in one disk file.
|
||||||
Thus, the maximum size of a single file is RELSEG_SIZE * BLCKSZ;
|
Thus, the maximum size of a single file is RELSEG_SIZE * BLCKSZ;
|
||||||
relations bigger than that are divided into multiple files.
|
relations bigger than that are divided into multiple files.
|
||||||
|
|
||||||
RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file size.
|
RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file size.
|
||||||
This is often 2 GB or 4GB in a 32-bit operating system, unless you
|
This is often 2 GB or 4GB in a 32-bit operating system, unless you
|
||||||
have large file support enabled. By default, we make the limit 1 GB
|
have large file support enabled. By default, we make the limit 1 GB
|
||||||
|
@ -329,7 +329,7 @@ AC_DEFINE_UNQUOTED([XLOG_BLCKSZ], ${XLOG_BLCKSZ}, [
|
||||||
buffers, else direct I/O may fail.
|
buffers, else direct I/O may fail.
|
||||||
|
|
||||||
Changing XLOG_BLCKSZ requires an initdb.
|
Changing XLOG_BLCKSZ requires an initdb.
|
||||||
])
|
])
|
||||||
|
|
||||||
#
|
#
|
||||||
# WAL segment size
|
# WAL segment size
|
||||||
|
@ -461,7 +461,7 @@ fi
|
||||||
# enable profiling if --enable-profiling
|
# enable profiling if --enable-profiling
|
||||||
if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
|
if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
|
||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
AC_DEFINE([PROFILE_PID_DIR], 1,
|
AC_DEFINE([PROFILE_PID_DIR], 1,
|
||||||
[Define to 1 to allow profiling output to be saved separately for each process.])
|
[Define to 1 to allow profiling output to be saved separately for each process.])
|
||||||
CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
|
CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
|
||||||
else
|
else
|
||||||
|
@ -1141,7 +1141,7 @@ if test "$with_krb5" = yes; then
|
||||||
AC_MSG_CHECKING(for krb5_free_unparsed_name)
|
AC_MSG_CHECKING(for krb5_free_unparsed_name)
|
||||||
AC_TRY_LINK([#include <krb5.h>],
|
AC_TRY_LINK([#include <krb5.h>],
|
||||||
[krb5_free_unparsed_name(NULL,NULL);],
|
[krb5_free_unparsed_name(NULL,NULL);],
|
||||||
[AC_DEFINE(HAVE_KRB5_FREE_UNPARSED_NAME, 1, [Define to 1 if you have krb5_free_unparsed_name])
|
[AC_DEFINE(HAVE_KRB5_FREE_UNPARSED_NAME, 1, [Define to 1 if you have krb5_free_unparsed_name])
|
||||||
AC_MSG_RESULT(yes)],
|
AC_MSG_RESULT(yes)],
|
||||||
[AC_MSG_RESULT(no)])
|
[AC_MSG_RESULT(no)])
|
||||||
fi
|
fi
|
||||||
|
@ -1156,8 +1156,8 @@ AC_SYS_LARGEFILE
|
||||||
AC_CHECK_SIZEOF([off_t])
|
AC_CHECK_SIZEOF([off_t])
|
||||||
|
|
||||||
# If we don't have largefile support, can't handle segsize >= 2GB.
|
# If we don't have largefile support, can't handle segsize >= 2GB.
|
||||||
if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
|
if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
|
||||||
AC_MSG_ERROR([Large file support is not enabled. Segment size cannot be larger than 1GB.])
|
AC_MSG_ERROR([Large file support is not enabled. Segment size cannot be larger than 1GB.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -1228,8 +1228,8 @@ if test "$PORTNAME" = "win32"; then
|
||||||
#
|
#
|
||||||
# To properly translate all NLS languages strings, we must support the
|
# To properly translate all NLS languages strings, we must support the
|
||||||
# *printf() %$ format, which allows *printf() arguments to be selected
|
# *printf() %$ format, which allows *printf() arguments to be selected
|
||||||
# by position in the translated string.
|
# by position in the translated string.
|
||||||
#
|
#
|
||||||
# libintl versions < 0.13 use the native *printf() functions, and Win32
|
# libintl versions < 0.13 use the native *printf() functions, and Win32
|
||||||
# *printf() doesn't understand %$, so we must use our /port versions,
|
# *printf() doesn't understand %$, so we must use our /port versions,
|
||||||
# which do understand %$. libintl versions >= 0.13 include their own
|
# which do understand %$. libintl versions >= 0.13 include their own
|
||||||
|
@ -1590,7 +1590,7 @@ AC_CHECK_SIZEOF([size_t])
|
||||||
AC_CHECK_SIZEOF([long])
|
AC_CHECK_SIZEOF([long])
|
||||||
|
|
||||||
# Decide whether float4 is passed by value: user-selectable, enabled by default
|
# Decide whether float4 is passed by value: user-selectable, enabled by default
|
||||||
AC_MSG_CHECKING([whether to build with float4 passed by value])
|
AC_MSG_CHECKING([whether to build with float4 passed by value])
|
||||||
PGAC_ARG_BOOL(enable, float4-byval, yes, [disable float4 passed by value],
|
PGAC_ARG_BOOL(enable, float4-byval, yes, [disable float4 passed by value],
|
||||||
[AC_DEFINE([USE_FLOAT4_BYVAL], 1,
|
[AC_DEFINE([USE_FLOAT4_BYVAL], 1,
|
||||||
[Define to 1 if you want float4 values to be passed by value. (--enable-float4-byval)])
|
[Define to 1 if you want float4 values to be passed by value. (--enable-float4-byval)])
|
||||||
|
@ -1858,7 +1858,7 @@ AC_CONFIG_LINKS([
|
||||||
|
|
||||||
if test "$PORTNAME" = "win32"; then
|
if test "$PORTNAME" = "win32"; then
|
||||||
AC_CONFIG_COMMANDS([check_win32_symlinks],[
|
AC_CONFIG_COMMANDS([check_win32_symlinks],[
|
||||||
# Links sometimes fail undetected on Mingw -
|
# Links sometimes fail undetected on Mingw -
|
||||||
# so here we detect it and warn the user
|
# so here we detect it and warn the user
|
||||||
for FILE in $CONFIG_LINKS
|
for FILE in $CONFIG_LINKS
|
||||||
do
|
do
|
||||||
|
|
|
@ -90,13 +90,13 @@ isn -
|
||||||
|
|
||||||
lo -
|
lo -
|
||||||
Large Object maintenance
|
Large Object maintenance
|
||||||
by Peter Mount <peter@retep.org.uk>
|
by Peter Mount <peter@retep.org.uk>
|
||||||
|
|
||||||
ltree -
|
ltree -
|
||||||
Tree-like data structures
|
Tree-like data structures
|
||||||
by Teodor Sigaev <teodor@sigaev.ru> and Oleg Bartunov <oleg@sai.msu.su>
|
by Teodor Sigaev <teodor@sigaev.ru> and Oleg Bartunov <oleg@sai.msu.su>
|
||||||
|
|
||||||
oid2name -
|
oid2name -
|
||||||
Maps numeric files to table names
|
Maps numeric files to table names
|
||||||
by B Palmer <bpalmer@crimelabs.net>
|
by B Palmer <bpalmer@crimelabs.net>
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ sslinfo -
|
||||||
Functions to get information about SSL certificates
|
Functions to get information about SSL certificates
|
||||||
by Victor Wagner <vitus@cryptocom.ru>
|
by Victor Wagner <vitus@cryptocom.ru>
|
||||||
|
|
||||||
start-scripts -
|
start-scripts -
|
||||||
Scripts for starting the server at boot time on various platforms.
|
Scripts for starting the server at boot time on various platforms.
|
||||||
|
|
||||||
tablefunc -
|
tablefunc -
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# contrib/btree_gin/Makefile
|
# contrib/btree_gin/Makefile
|
||||||
|
|
||||||
MODULE_big = btree_gin
|
MODULE_big = btree_gin
|
||||||
OBJS = btree_gin.o
|
OBJS = btree_gin.o
|
||||||
|
|
||||||
DATA_built = btree_gin.sql
|
DATA_built = btree_gin.sql
|
||||||
DATA = uninstall_btree_gin.sql
|
DATA = uninstall_btree_gin.sql
|
||||||
|
|
|
@ -2,7 +2,7 @@ set enable_seqscan=off;
|
||||||
CREATE TABLE test_cidr (
|
CREATE TABLE test_cidr (
|
||||||
i cidr
|
i cidr
|
||||||
);
|
);
|
||||||
INSERT INTO test_cidr VALUES
|
INSERT INTO test_cidr VALUES
|
||||||
( '1.2.3.4' ),
|
( '1.2.3.4' ),
|
||||||
( '1.2.4.4' ),
|
( '1.2.4.4' ),
|
||||||
( '1.2.5.4' ),
|
( '1.2.5.4' ),
|
||||||
|
|
|
@ -2,7 +2,7 @@ set enable_seqscan=off;
|
||||||
CREATE TABLE test_date (
|
CREATE TABLE test_date (
|
||||||
i date
|
i date
|
||||||
);
|
);
|
||||||
INSERT INTO test_date VALUES
|
INSERT INTO test_date VALUES
|
||||||
( '2004-10-23' ),
|
( '2004-10-23' ),
|
||||||
( '2004-10-24' ),
|
( '2004-10-24' ),
|
||||||
( '2004-10-25' ),
|
( '2004-10-25' ),
|
||||||
|
|
|
@ -2,7 +2,7 @@ set enable_seqscan=off;
|
||||||
CREATE TABLE test_inet (
|
CREATE TABLE test_inet (
|
||||||
i inet
|
i inet
|
||||||
);
|
);
|
||||||
INSERT INTO test_inet VALUES
|
INSERT INTO test_inet VALUES
|
||||||
( '1.2.3.4/16' ),
|
( '1.2.3.4/16' ),
|
||||||
( '1.2.4.4/16' ),
|
( '1.2.4.4/16' ),
|
||||||
( '1.2.5.4/16' ),
|
( '1.2.5.4/16' ),
|
||||||
|
|
|
@ -2,7 +2,7 @@ set enable_seqscan=off;
|
||||||
CREATE TABLE test_interval (
|
CREATE TABLE test_interval (
|
||||||
i interval
|
i interval
|
||||||
);
|
);
|
||||||
INSERT INTO test_interval VALUES
|
INSERT INTO test_interval VALUES
|
||||||
( '03:55:08' ),
|
( '03:55:08' ),
|
||||||
( '04:55:08' ),
|
( '04:55:08' ),
|
||||||
( '05:55:08' ),
|
( '05:55:08' ),
|
||||||
|
|
|
@ -2,7 +2,7 @@ set enable_seqscan=off;
|
||||||
CREATE TABLE test_macaddr (
|
CREATE TABLE test_macaddr (
|
||||||
i macaddr
|
i macaddr
|
||||||
);
|
);
|
||||||
INSERT INTO test_macaddr VALUES
|
INSERT INTO test_macaddr VALUES
|
||||||
( '22:00:5c:03:55:08' ),
|
( '22:00:5c:03:55:08' ),
|
||||||
( '22:00:5c:04:55:08' ),
|
( '22:00:5c:04:55:08' ),
|
||||||
( '22:00:5c:05:55:08' ),
|
( '22:00:5c:05:55:08' ),
|
||||||
|
|
|
@ -2,7 +2,7 @@ set enable_seqscan=off;
|
||||||
CREATE TABLE test_time (
|
CREATE TABLE test_time (
|
||||||
i time
|
i time
|
||||||
);
|
);
|
||||||
INSERT INTO test_time VALUES
|
INSERT INTO test_time VALUES
|
||||||
( '03:55:08' ),
|
( '03:55:08' ),
|
||||||
( '04:55:08' ),
|
( '04:55:08' ),
|
||||||
( '05:55:08' ),
|
( '05:55:08' ),
|
||||||
|
|
|
@ -2,7 +2,7 @@ set enable_seqscan=off;
|
||||||
CREATE TABLE test_timestamp (
|
CREATE TABLE test_timestamp (
|
||||||
i timestamp
|
i timestamp
|
||||||
);
|
);
|
||||||
INSERT INTO test_timestamp VALUES
|
INSERT INTO test_timestamp VALUES
|
||||||
( '2004-10-26 03:55:08' ),
|
( '2004-10-26 03:55:08' ),
|
||||||
( '2004-10-26 04:55:08' ),
|
( '2004-10-26 04:55:08' ),
|
||||||
( '2004-10-26 05:55:08' ),
|
( '2004-10-26 05:55:08' ),
|
||||||
|
|
|
@ -2,7 +2,7 @@ set enable_seqscan=off;
|
||||||
CREATE TABLE test_timestamptz (
|
CREATE TABLE test_timestamptz (
|
||||||
i timestamptz
|
i timestamptz
|
||||||
);
|
);
|
||||||
INSERT INTO test_timestamptz VALUES
|
INSERT INTO test_timestamptz VALUES
|
||||||
( '2004-10-26 03:55:08' ),
|
( '2004-10-26 03:55:08' ),
|
||||||
( '2004-10-26 04:55:08' ),
|
( '2004-10-26 04:55:08' ),
|
||||||
( '2004-10-26 05:55:08' ),
|
( '2004-10-26 05:55:08' ),
|
||||||
|
|
|
@ -2,7 +2,7 @@ set enable_seqscan=off;
|
||||||
CREATE TABLE test_timetz (
|
CREATE TABLE test_timetz (
|
||||||
i timetz
|
i timetz
|
||||||
);
|
);
|
||||||
INSERT INTO test_timetz VALUES
|
INSERT INTO test_timetz VALUES
|
||||||
( '03:55:08 GMT+2' ),
|
( '03:55:08 GMT+2' ),
|
||||||
( '04:55:08 GMT+2' ),
|
( '04:55:08 GMT+2' ),
|
||||||
( '05:55:08 GMT+2' ),
|
( '05:55:08 GMT+2' ),
|
||||||
|
|
|
@ -4,7 +4,7 @@ CREATE TABLE test_cidr (
|
||||||
i cidr
|
i cidr
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO test_cidr VALUES
|
INSERT INTO test_cidr VALUES
|
||||||
( '1.2.3.4' ),
|
( '1.2.3.4' ),
|
||||||
( '1.2.4.4' ),
|
( '1.2.4.4' ),
|
||||||
( '1.2.5.4' ),
|
( '1.2.5.4' ),
|
||||||
|
|
|
@ -4,7 +4,7 @@ CREATE TABLE test_date (
|
||||||
i date
|
i date
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO test_date VALUES
|
INSERT INTO test_date VALUES
|
||||||
( '2004-10-23' ),
|
( '2004-10-23' ),
|
||||||
( '2004-10-24' ),
|
( '2004-10-24' ),
|
||||||
( '2004-10-25' ),
|
( '2004-10-25' ),
|
||||||
|
|
|
@ -4,7 +4,7 @@ CREATE TABLE test_inet (
|
||||||
i inet
|
i inet
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO test_inet VALUES
|
INSERT INTO test_inet VALUES
|
||||||
( '1.2.3.4/16' ),
|
( '1.2.3.4/16' ),
|
||||||
( '1.2.4.4/16' ),
|
( '1.2.4.4/16' ),
|
||||||
( '1.2.5.4/16' ),
|
( '1.2.5.4/16' ),
|
||||||
|
|
|
@ -4,7 +4,7 @@ CREATE TABLE test_interval (
|
||||||
i interval
|
i interval
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO test_interval VALUES
|
INSERT INTO test_interval VALUES
|
||||||
( '03:55:08' ),
|
( '03:55:08' ),
|
||||||
( '04:55:08' ),
|
( '04:55:08' ),
|
||||||
( '05:55:08' ),
|
( '05:55:08' ),
|
||||||
|
|
|
@ -4,7 +4,7 @@ CREATE TABLE test_macaddr (
|
||||||
i macaddr
|
i macaddr
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO test_macaddr VALUES
|
INSERT INTO test_macaddr VALUES
|
||||||
( '22:00:5c:03:55:08' ),
|
( '22:00:5c:03:55:08' ),
|
||||||
( '22:00:5c:04:55:08' ),
|
( '22:00:5c:04:55:08' ),
|
||||||
( '22:00:5c:05:55:08' ),
|
( '22:00:5c:05:55:08' ),
|
||||||
|
|
|
@ -4,7 +4,7 @@ CREATE TABLE test_time (
|
||||||
i time
|
i time
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO test_time VALUES
|
INSERT INTO test_time VALUES
|
||||||
( '03:55:08' ),
|
( '03:55:08' ),
|
||||||
( '04:55:08' ),
|
( '04:55:08' ),
|
||||||
( '05:55:08' ),
|
( '05:55:08' ),
|
||||||
|
|
|
@ -4,7 +4,7 @@ CREATE TABLE test_timestamp (
|
||||||
i timestamp
|
i timestamp
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO test_timestamp VALUES
|
INSERT INTO test_timestamp VALUES
|
||||||
( '2004-10-26 03:55:08' ),
|
( '2004-10-26 03:55:08' ),
|
||||||
( '2004-10-26 04:55:08' ),
|
( '2004-10-26 04:55:08' ),
|
||||||
( '2004-10-26 05:55:08' ),
|
( '2004-10-26 05:55:08' ),
|
||||||
|
|
|
@ -4,7 +4,7 @@ CREATE TABLE test_timestamptz (
|
||||||
i timestamptz
|
i timestamptz
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO test_timestamptz VALUES
|
INSERT INTO test_timestamptz VALUES
|
||||||
( '2004-10-26 03:55:08' ),
|
( '2004-10-26 03:55:08' ),
|
||||||
( '2004-10-26 04:55:08' ),
|
( '2004-10-26 04:55:08' ),
|
||||||
( '2004-10-26 05:55:08' ),
|
( '2004-10-26 05:55:08' ),
|
||||||
|
|
|
@ -4,7 +4,7 @@ CREATE TABLE test_timetz (
|
||||||
i timetz
|
i timetz
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO test_timetz VALUES
|
INSERT INTO test_timetz VALUES
|
||||||
( '03:55:08 GMT+2' ),
|
( '03:55:08 GMT+2' ),
|
||||||
( '04:55:08 GMT+2' ),
|
( '04:55:08 GMT+2' ),
|
||||||
( '05:55:08 GMT+2' ),
|
( '05:55:08 GMT+2' ),
|
||||||
|
|
|
@ -136,7 +136,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_oid_ops
|
CREATE OPERATOR CLASS gist_oid_ops
|
||||||
DEFAULT FOR TYPE oid USING gist
|
DEFAULT FOR TYPE oid USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -194,7 +194,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_int2_ops
|
CREATE OPERATOR CLASS gist_int2_ops
|
||||||
DEFAULT FOR TYPE int2 USING gist
|
DEFAULT FOR TYPE int2 USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -251,7 +251,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_int4_ops
|
CREATE OPERATOR CLASS gist_int4_ops
|
||||||
DEFAULT FOR TYPE int4 USING gist
|
DEFAULT FOR TYPE int4 USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -308,7 +308,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_int8_ops
|
CREATE OPERATOR CLASS gist_int8_ops
|
||||||
DEFAULT FOR TYPE int8 USING gist
|
DEFAULT FOR TYPE int8 USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -366,7 +366,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_float4_ops
|
CREATE OPERATOR CLASS gist_float4_ops
|
||||||
DEFAULT FOR TYPE float4 USING gist
|
DEFAULT FOR TYPE float4 USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -426,7 +426,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_float8_ops
|
CREATE OPERATOR CLASS gist_float8_ops
|
||||||
DEFAULT FOR TYPE float8 USING gist
|
DEFAULT FOR TYPE float8 USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -448,7 +448,7 @@ AS
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
-- timestamp ops
|
-- timestamp ops
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -461,7 +461,7 @@ CREATE OR REPLACE FUNCTION gbt_tstz_consistent(internal,timestamptz,int2,oid,int
|
||||||
RETURNS bool
|
RETURNS bool
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gbt_ts_compress(internal)
|
CREATE OR REPLACE FUNCTION gbt_ts_compress(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
|
@ -476,12 +476,12 @@ CREATE OR REPLACE FUNCTION gbt_ts_penalty(internal,internal,internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gbt_ts_picksplit(internal, internal)
|
CREATE OR REPLACE FUNCTION gbt_ts_picksplit(internal, internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gbt_ts_union(bytea, internal)
|
CREATE OR REPLACE FUNCTION gbt_ts_union(bytea, internal)
|
||||||
RETURNS gbtreekey16
|
RETURNS gbtreekey16
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
|
@ -494,7 +494,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_timestamp_ops
|
CREATE OPERATOR CLASS gist_timestamp_ops
|
||||||
DEFAULT FOR TYPE timestamp USING gist
|
DEFAULT FOR TYPE timestamp USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -514,7 +514,7 @@ AS
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_timestamptz_ops
|
CREATE OPERATOR CLASS gist_timestamptz_ops
|
||||||
DEFAULT FOR TYPE timestamptz USING gist
|
DEFAULT FOR TYPE timestamptz USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -536,7 +536,7 @@ AS
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
-- time ops
|
-- time ops
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -564,12 +564,12 @@ CREATE OR REPLACE FUNCTION gbt_time_penalty(internal,internal,internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gbt_time_picksplit(internal, internal)
|
CREATE OR REPLACE FUNCTION gbt_time_picksplit(internal, internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gbt_time_union(bytea, internal)
|
CREATE OR REPLACE FUNCTION gbt_time_union(bytea, internal)
|
||||||
RETURNS gbtreekey16
|
RETURNS gbtreekey16
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
|
@ -582,7 +582,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_time_ops
|
CREATE OPERATOR CLASS gist_time_ops
|
||||||
DEFAULT FOR TYPE time USING gist
|
DEFAULT FOR TYPE time USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -600,7 +600,7 @@ AS
|
||||||
STORAGE gbtreekey16;
|
STORAGE gbtreekey16;
|
||||||
|
|
||||||
CREATE OPERATOR CLASS gist_timetz_ops
|
CREATE OPERATOR CLASS gist_timetz_ops
|
||||||
DEFAULT FOR TYPE timetz USING gist
|
DEFAULT FOR TYPE timetz USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -622,7 +622,7 @@ AS
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
-- date ops
|
-- date ops
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -640,12 +640,12 @@ CREATE OR REPLACE FUNCTION gbt_date_penalty(internal,internal,internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gbt_date_picksplit(internal, internal)
|
CREATE OR REPLACE FUNCTION gbt_date_picksplit(internal, internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gbt_date_union(bytea, internal)
|
CREATE OR REPLACE FUNCTION gbt_date_union(bytea, internal)
|
||||||
RETURNS gbtreekey8
|
RETURNS gbtreekey8
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
|
@ -658,7 +658,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_date_ops
|
CREATE OPERATOR CLASS gist_date_ops
|
||||||
DEFAULT FOR TYPE date USING gist
|
DEFAULT FOR TYPE date USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -680,7 +680,7 @@ AS
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
-- interval ops
|
-- interval ops
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -703,12 +703,12 @@ CREATE OR REPLACE FUNCTION gbt_intv_penalty(internal,internal,internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gbt_intv_picksplit(internal, internal)
|
CREATE OR REPLACE FUNCTION gbt_intv_picksplit(internal, internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gbt_intv_union(bytea, internal)
|
CREATE OR REPLACE FUNCTION gbt_intv_union(bytea, internal)
|
||||||
RETURNS gbtreekey32
|
RETURNS gbtreekey32
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
|
@ -721,7 +721,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_interval_ops
|
CREATE OPERATOR CLASS gist_interval_ops
|
||||||
DEFAULT FOR TYPE interval USING gist
|
DEFAULT FOR TYPE interval USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -778,7 +778,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_cash_ops
|
CREATE OPERATOR CLASS gist_cash_ops
|
||||||
DEFAULT FOR TYPE money USING gist
|
DEFAULT FOR TYPE money USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -835,7 +835,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_macaddr_ops
|
CREATE OPERATOR CLASS gist_macaddr_ops
|
||||||
DEFAULT FOR TYPE macaddr USING gist
|
DEFAULT FOR TYPE macaddr USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -904,7 +904,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_text_ops
|
CREATE OPERATOR CLASS gist_text_ops
|
||||||
DEFAULT FOR TYPE text USING gist
|
DEFAULT FOR TYPE text USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -919,12 +919,12 @@ AS
|
||||||
FUNCTION 5 gbt_text_penalty (internal, internal, internal),
|
FUNCTION 5 gbt_text_penalty (internal, internal, internal),
|
||||||
FUNCTION 6 gbt_text_picksplit (internal, internal),
|
FUNCTION 6 gbt_text_picksplit (internal, internal),
|
||||||
FUNCTION 7 gbt_text_same (internal, internal, internal),
|
FUNCTION 7 gbt_text_same (internal, internal, internal),
|
||||||
STORAGE gbtreekey_var;
|
STORAGE gbtreekey_var;
|
||||||
|
|
||||||
|
|
||||||
---- Create the operator class
|
---- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_bpchar_ops
|
CREATE OPERATOR CLASS gist_bpchar_ops
|
||||||
DEFAULT FOR TYPE bpchar USING gist
|
DEFAULT FOR TYPE bpchar USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -939,7 +939,7 @@ AS
|
||||||
FUNCTION 5 gbt_text_penalty (internal, internal, internal),
|
FUNCTION 5 gbt_text_penalty (internal, internal, internal),
|
||||||
FUNCTION 6 gbt_text_picksplit (internal, internal),
|
FUNCTION 6 gbt_text_picksplit (internal, internal),
|
||||||
FUNCTION 7 gbt_text_same (internal, internal, internal),
|
FUNCTION 7 gbt_text_same (internal, internal, internal),
|
||||||
STORAGE gbtreekey_var;
|
STORAGE gbtreekey_var;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -982,7 +982,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_bytea_ops
|
CREATE OPERATOR CLASS gist_bytea_ops
|
||||||
DEFAULT FOR TYPE bytea USING gist
|
DEFAULT FOR TYPE bytea USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -997,7 +997,7 @@ AS
|
||||||
FUNCTION 5 gbt_bytea_penalty (internal, internal, internal),
|
FUNCTION 5 gbt_bytea_penalty (internal, internal, internal),
|
||||||
FUNCTION 6 gbt_bytea_picksplit (internal, internal),
|
FUNCTION 6 gbt_bytea_picksplit (internal, internal),
|
||||||
FUNCTION 7 gbt_bytea_same (internal, internal, internal),
|
FUNCTION 7 gbt_bytea_same (internal, internal, internal),
|
||||||
STORAGE gbtreekey_var;
|
STORAGE gbtreekey_var;
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
|
@ -1040,7 +1040,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_numeric_ops
|
CREATE OPERATOR CLASS gist_numeric_ops
|
||||||
DEFAULT FOR TYPE numeric USING gist
|
DEFAULT FOR TYPE numeric USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -1055,7 +1055,7 @@ AS
|
||||||
FUNCTION 5 gbt_numeric_penalty (internal, internal, internal),
|
FUNCTION 5 gbt_numeric_penalty (internal, internal, internal),
|
||||||
FUNCTION 6 gbt_numeric_picksplit (internal, internal),
|
FUNCTION 6 gbt_numeric_picksplit (internal, internal),
|
||||||
FUNCTION 7 gbt_numeric_same (internal, internal, internal),
|
FUNCTION 7 gbt_numeric_same (internal, internal, internal),
|
||||||
STORAGE gbtreekey_var;
|
STORAGE gbtreekey_var;
|
||||||
|
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
@ -1096,7 +1096,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_bit_ops
|
CREATE OPERATOR CLASS gist_bit_ops
|
||||||
DEFAULT FOR TYPE bit USING gist
|
DEFAULT FOR TYPE bit USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -1111,12 +1111,12 @@ AS
|
||||||
FUNCTION 5 gbt_bit_penalty (internal, internal, internal),
|
FUNCTION 5 gbt_bit_penalty (internal, internal, internal),
|
||||||
FUNCTION 6 gbt_bit_picksplit (internal, internal),
|
FUNCTION 6 gbt_bit_picksplit (internal, internal),
|
||||||
FUNCTION 7 gbt_bit_same (internal, internal, internal),
|
FUNCTION 7 gbt_bit_same (internal, internal, internal),
|
||||||
STORAGE gbtreekey_var;
|
STORAGE gbtreekey_var;
|
||||||
|
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_vbit_ops
|
CREATE OPERATOR CLASS gist_vbit_ops
|
||||||
DEFAULT FOR TYPE varbit USING gist
|
DEFAULT FOR TYPE varbit USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -1131,7 +1131,7 @@ AS
|
||||||
FUNCTION 5 gbt_bit_penalty (internal, internal, internal),
|
FUNCTION 5 gbt_bit_penalty (internal, internal, internal),
|
||||||
FUNCTION 6 gbt_bit_picksplit (internal, internal),
|
FUNCTION 6 gbt_bit_picksplit (internal, internal),
|
||||||
FUNCTION 7 gbt_bit_same (internal, internal, internal),
|
FUNCTION 7 gbt_bit_same (internal, internal, internal),
|
||||||
STORAGE gbtreekey_var;
|
STORAGE gbtreekey_var;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1175,7 +1175,7 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_inet_ops
|
CREATE OPERATOR CLASS gist_inet_ops
|
||||||
DEFAULT FOR TYPE inet USING gist
|
DEFAULT FOR TYPE inet USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
|
@ -1194,14 +1194,14 @@ AS
|
||||||
|
|
||||||
-- Create the operator class
|
-- Create the operator class
|
||||||
CREATE OPERATOR CLASS gist_cidr_ops
|
CREATE OPERATOR CLASS gist_cidr_ops
|
||||||
DEFAULT FOR TYPE cidr USING gist
|
DEFAULT FOR TYPE cidr USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 < (inet, inet) ,
|
OPERATOR 1 < (inet, inet) ,
|
||||||
OPERATOR 2 <= (inet, inet) ,
|
OPERATOR 2 <= (inet, inet) ,
|
||||||
OPERATOR 3 = (inet, inet) ,
|
OPERATOR 3 = (inet, inet) ,
|
||||||
OPERATOR 4 >= (inet, inet) ,
|
OPERATOR 4 >= (inet, inet) ,
|
||||||
OPERATOR 5 > (inet, inet) ,
|
OPERATOR 5 > (inet, inet) ,
|
||||||
OPERATOR 6 <> (inet, inet) ,
|
OPERATOR 6 <> (inet, inet) ,
|
||||||
FUNCTION 1 gbt_inet_consistent (internal, inet, int2, oid, internal),
|
FUNCTION 1 gbt_inet_consistent (internal, inet, int2, oid, internal),
|
||||||
FUNCTION 2 gbt_inet_union (bytea, internal),
|
FUNCTION 2 gbt_inet_union (bytea, internal),
|
||||||
FUNCTION 3 gbt_inet_compress (internal),
|
FUNCTION 3 gbt_inet_compress (internal),
|
||||||
|
|
|
@ -116,9 +116,9 @@ DROP OPERATOR CLASS gist_interval_ops USING gist;
|
||||||
DROP FUNCTION gbt_intv_same(internal, internal, internal);
|
DROP FUNCTION gbt_intv_same(internal, internal, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_intv_union(bytea, internal);
|
DROP FUNCTION gbt_intv_union(bytea, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_intv_picksplit(internal, internal);
|
DROP FUNCTION gbt_intv_picksplit(internal, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_intv_penalty(internal,internal,internal);
|
DROP FUNCTION gbt_intv_penalty(internal,internal,internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_intv_decompress(internal);
|
DROP FUNCTION gbt_intv_decompress(internal);
|
||||||
|
@ -132,9 +132,9 @@ DROP OPERATOR CLASS gist_date_ops USING gist;
|
||||||
DROP FUNCTION gbt_date_same(internal, internal, internal);
|
DROP FUNCTION gbt_date_same(internal, internal, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_date_union(bytea, internal);
|
DROP FUNCTION gbt_date_union(bytea, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_date_picksplit(internal, internal);
|
DROP FUNCTION gbt_date_picksplit(internal, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_date_penalty(internal,internal,internal);
|
DROP FUNCTION gbt_date_penalty(internal,internal,internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_date_compress(internal);
|
DROP FUNCTION gbt_date_compress(internal);
|
||||||
|
@ -148,9 +148,9 @@ DROP OPERATOR CLASS gist_time_ops USING gist;
|
||||||
DROP FUNCTION gbt_time_same(internal, internal, internal);
|
DROP FUNCTION gbt_time_same(internal, internal, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_time_union(bytea, internal);
|
DROP FUNCTION gbt_time_union(bytea, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_time_picksplit(internal, internal);
|
DROP FUNCTION gbt_time_picksplit(internal, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_time_penalty(internal,internal,internal);
|
DROP FUNCTION gbt_time_penalty(internal,internal,internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_timetz_compress(internal);
|
DROP FUNCTION gbt_timetz_compress(internal);
|
||||||
|
@ -168,15 +168,15 @@ DROP OPERATOR CLASS gist_timestamp_ops USING gist;
|
||||||
DROP FUNCTION gbt_ts_same(internal, internal, internal);
|
DROP FUNCTION gbt_ts_same(internal, internal, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_ts_union(bytea, internal);
|
DROP FUNCTION gbt_ts_union(bytea, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_ts_picksplit(internal, internal);
|
DROP FUNCTION gbt_ts_picksplit(internal, internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_ts_penalty(internal,internal,internal);
|
DROP FUNCTION gbt_ts_penalty(internal,internal,internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_tstz_compress(internal);
|
DROP FUNCTION gbt_tstz_compress(internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_ts_compress(internal);
|
DROP FUNCTION gbt_ts_compress(internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_tstz_consistent(internal,timestamptz,int2,oid,internal);
|
DROP FUNCTION gbt_tstz_consistent(internal,timestamptz,int2,oid,internal);
|
||||||
|
|
||||||
DROP FUNCTION gbt_ts_consistent(internal,timestamp,int2,oid,internal);
|
DROP FUNCTION gbt_ts_consistent(internal,timestamp,int2,oid,internal);
|
||||||
|
|
|
@ -343,7 +343,7 @@ CREATE OPERATOR !~~* (
|
||||||
);
|
);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Matching citext to text.
|
-- Matching citext to text.
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION texticlike(citext, text)
|
CREATE OR REPLACE FUNCTION texticlike(citext, text)
|
||||||
|
|
|
@ -1046,7 +1046,7 @@ CREATE TABLE caster (
|
||||||
bpchar bpchar,
|
bpchar bpchar,
|
||||||
char char,
|
char char,
|
||||||
chr "char",
|
chr "char",
|
||||||
name name,
|
name name,
|
||||||
bytea bytea,
|
bytea bytea,
|
||||||
boolean boolean,
|
boolean boolean,
|
||||||
float4 float4,
|
float4 float4,
|
||||||
|
@ -1055,7 +1055,7 @@ CREATE TABLE caster (
|
||||||
int8 int8,
|
int8 int8,
|
||||||
int4 int4,
|
int4 int4,
|
||||||
int2 int2,
|
int2 int2,
|
||||||
cidr cidr,
|
cidr cidr,
|
||||||
inet inet,
|
inet inet,
|
||||||
macaddr macaddr,
|
macaddr macaddr,
|
||||||
money money,
|
money money,
|
||||||
|
|
|
@ -1046,7 +1046,7 @@ CREATE TABLE caster (
|
||||||
bpchar bpchar,
|
bpchar bpchar,
|
||||||
char char,
|
char char,
|
||||||
chr "char",
|
chr "char",
|
||||||
name name,
|
name name,
|
||||||
bytea bytea,
|
bytea bytea,
|
||||||
boolean boolean,
|
boolean boolean,
|
||||||
float4 float4,
|
float4 float4,
|
||||||
|
@ -1055,7 +1055,7 @@ CREATE TABLE caster (
|
||||||
int8 int8,
|
int8 int8,
|
||||||
int4 int4,
|
int4 int4,
|
||||||
int2 int2,
|
int2 int2,
|
||||||
cidr cidr,
|
cidr cidr,
|
||||||
inet inet,
|
inet inet,
|
||||||
macaddr macaddr,
|
macaddr macaddr,
|
||||||
money money,
|
money money,
|
||||||
|
|
|
@ -302,7 +302,7 @@ CREATE TABLE caster (
|
||||||
bpchar bpchar,
|
bpchar bpchar,
|
||||||
char char,
|
char char,
|
||||||
chr "char",
|
chr "char",
|
||||||
name name,
|
name name,
|
||||||
bytea bytea,
|
bytea bytea,
|
||||||
boolean boolean,
|
boolean boolean,
|
||||||
float4 float4,
|
float4 float4,
|
||||||
|
@ -311,7 +311,7 @@ CREATE TABLE caster (
|
||||||
int8 int8,
|
int8 int8,
|
||||||
int4 int4,
|
int4 int4,
|
||||||
int2 int2,
|
int2 int2,
|
||||||
cidr cidr,
|
cidr cidr,
|
||||||
inet inet,
|
inet inet,
|
||||||
macaddr macaddr,
|
macaddr macaddr,
|
||||||
money money,
|
money money,
|
||||||
|
|
|
@ -6,10 +6,10 @@ Code Cleanup:
|
||||||
|
|
||||||
Update the calling convention for all external facing functions. By external
|
Update the calling convention for all external facing functions. By external
|
||||||
facing, I mean all functions that are directly referenced in cube.sql. Prior
|
facing, I mean all functions that are directly referenced in cube.sql. Prior
|
||||||
to my update, all functions used the older V0 calling convention. They now
|
to my update, all functions used the older V0 calling convention. They now
|
||||||
use V1.
|
use V1.
|
||||||
|
|
||||||
New Functions:
|
New Functions:
|
||||||
|
|
||||||
cube(float[]), which makes a zero volume cube from a float array
|
cube(float[]), which makes a zero volume cube from a float array
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
SET search_path = public;
|
SET search_path = public;
|
||||||
|
|
||||||
-- Create the user-defined type for N-dimensional boxes
|
-- Create the user-defined type for N-dimensional boxes
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION cube_in(cstring)
|
CREATE OR REPLACE FUNCTION cube_in(cstring)
|
||||||
RETURNS cube
|
RETURNS cube
|
||||||
|
@ -268,12 +268,12 @@ AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION g_cube_compress(internal)
|
CREATE OR REPLACE FUNCTION g_cube_compress(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION g_cube_decompress(internal)
|
CREATE OR REPLACE FUNCTION g_cube_decompress(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
|
@ -288,12 +288,12 @@ AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION g_cube_union(internal, internal)
|
CREATE OR REPLACE FUNCTION g_cube_union(internal, internal)
|
||||||
RETURNS cube
|
RETURNS cube
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION g_cube_same(cube, cube, internal)
|
CREATE OR REPLACE FUNCTION g_cube_same(cube, cube, internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ box:
|
||||||
O_BRACKET paren_list COMMA paren_list C_BRACKET {
|
O_BRACKET paren_list COMMA paren_list C_BRACKET {
|
||||||
|
|
||||||
int dim;
|
int dim;
|
||||||
|
|
||||||
dim = delim_count($2, ',') + 1;
|
dim = delim_count($2, ',') + 1;
|
||||||
if ( (delim_count($4, ',') + 1) != dim ) {
|
if ( (delim_count($4, ',') + 1) != dim ) {
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
|
@ -69,16 +69,16 @@ box:
|
||||||
CUBE_MAX_DIM)));
|
CUBE_MAX_DIM)));
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
*((void **)result) = write_box( dim, $2, $4 );
|
*((void **)result) = write_box( dim, $2, $4 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
|
||||||
paren_list COMMA paren_list {
|
paren_list COMMA paren_list {
|
||||||
int dim;
|
int dim;
|
||||||
|
|
||||||
dim = delim_count($1, ',') + 1;
|
dim = delim_count($1, ',') + 1;
|
||||||
|
|
||||||
if ( (delim_count($3, ',') + 1) != dim ) {
|
if ( (delim_count($3, ',') + 1) != dim ) {
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||||
|
@ -95,7 +95,7 @@ box:
|
||||||
CUBE_MAX_DIM)));
|
CUBE_MAX_DIM)));
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
*((void **)result) = write_box( dim, $1, $3 );
|
*((void **)result) = write_box( dim, $1, $3 );
|
||||||
}
|
}
|
||||||
|
|
|
|
||||||
|
@ -146,7 +146,7 @@ list:
|
||||||
$$ = palloc(scanbuflen + 1);
|
$$ = palloc(scanbuflen + 1);
|
||||||
strcpy($$, $1);
|
strcpy($$, $1);
|
||||||
}
|
}
|
||||||
|
|
|
|
||||||
list COMMA CUBEFLOAT {
|
list COMMA CUBEFLOAT {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
strcat($$, ",");
|
strcat($$, ",");
|
||||||
|
@ -169,31 +169,31 @@ delim_count(char *s, char delim)
|
||||||
return (ndelim);
|
return (ndelim);
|
||||||
}
|
}
|
||||||
|
|
||||||
static NDBOX *
|
static NDBOX *
|
||||||
write_box(unsigned int dim, char *str1, char *str2)
|
write_box(unsigned int dim, char *str1, char *str2)
|
||||||
{
|
{
|
||||||
NDBOX * bp;
|
NDBOX * bp;
|
||||||
char * s;
|
char * s;
|
||||||
int i;
|
int i;
|
||||||
int size = offsetof(NDBOX, x[0]) + sizeof(double) * dim * 2;
|
int size = offsetof(NDBOX, x[0]) + sizeof(double) * dim * 2;
|
||||||
|
|
||||||
bp = palloc0(size);
|
bp = palloc0(size);
|
||||||
SET_VARSIZE(bp, size);
|
SET_VARSIZE(bp, size);
|
||||||
bp->dim = dim;
|
bp->dim = dim;
|
||||||
|
|
||||||
s = str1;
|
s = str1;
|
||||||
bp->x[i=0] = strtod(s, NULL);
|
bp->x[i=0] = strtod(s, NULL);
|
||||||
while ((s = strchr(s, ',')) != NULL) {
|
while ((s = strchr(s, ',')) != NULL) {
|
||||||
s++; i++;
|
s++; i++;
|
||||||
bp->x[i] = strtod(s, NULL);
|
bp->x[i] = strtod(s, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
s = str2;
|
s = str2;
|
||||||
bp->x[i=dim] = strtod(s, NULL);
|
bp->x[i=dim] = strtod(s, NULL);
|
||||||
while ((s = strchr(s, ',')) != NULL) {
|
while ((s = strchr(s, ',')) != NULL) {
|
||||||
s++; i++;
|
s++; i++;
|
||||||
bp->x[i] = strtod(s, NULL);
|
bp->x[i] = strtod(s, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(bp);
|
return(bp);
|
||||||
}
|
}
|
||||||
|
@ -206,13 +206,13 @@ write_point_as_box(char *str, int dim)
|
||||||
int i, size;
|
int i, size;
|
||||||
double x;
|
double x;
|
||||||
char * s = str;
|
char * s = str;
|
||||||
|
|
||||||
size = offsetof(NDBOX, x[0]) + sizeof(double) * dim * 2;
|
size = offsetof(NDBOX, x[0]) + sizeof(double) * dim * 2;
|
||||||
|
|
||||||
bp = palloc0(size);
|
bp = palloc0(size);
|
||||||
SET_VARSIZE(bp, size);
|
SET_VARSIZE(bp, size);
|
||||||
bp->dim = dim;
|
bp->dim = dim;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
x = strtod(s, NULL);
|
x = strtod(s, NULL);
|
||||||
bp->x[0] = x;
|
bp->x[0] = x;
|
||||||
|
@ -222,7 +222,7 @@ write_point_as_box(char *str, int dim)
|
||||||
x = strtod(s, NULL);
|
x = strtod(s, NULL);
|
||||||
bp->x[i] = x;
|
bp->x[i] = x;
|
||||||
bp->x[i+dim] = x;
|
bp->x[i+dim] = x;
|
||||||
}
|
}
|
||||||
|
|
||||||
return(bp);
|
return(bp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
%{
|
%{
|
||||||
/*
|
/*
|
||||||
** A scanner for EMP-style numeric ranges
|
* A scanner for EMP-style numeric ranges
|
||||||
* contrib/cube/cubescan.l
|
* contrib/cube/cubescan.l
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
|
|
|
@ -473,13 +473,13 @@ SELECT cube('{0,1,2}'::float[]);
|
||||||
(0, 1, 2)
|
(0, 1, 2)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
|
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
|
||||||
cube_subset
|
cube_subset
|
||||||
---------------------------
|
---------------------------
|
||||||
(5, 3, 1, 1),(8, 7, 6, 6)
|
(5, 3, 1, 1),(8, 7, 6, 6)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
|
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
|
||||||
ERROR: Index out of bounds
|
ERROR: Index out of bounds
|
||||||
--
|
--
|
||||||
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
|
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
|
||||||
|
@ -1107,11 +1107,11 @@ SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Load some example data and build the index
|
-- Load some example data and build the index
|
||||||
--
|
--
|
||||||
CREATE TABLE test_cube (c cube);
|
CREATE TABLE test_cube (c cube);
|
||||||
\copy test_cube from 'data/test_cube.data'
|
\copy test_cube from 'data/test_cube.data'
|
||||||
CREATE INDEX test_cube_ix ON test_cube USING gist (c);
|
CREATE INDEX test_cube_ix ON test_cube USING gist (c);
|
||||||
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
||||||
c
|
c
|
||||||
--------------------------
|
--------------------------
|
||||||
(337, 455),(240, 359)
|
(337, 455),(240, 359)
|
||||||
|
@ -1121,8 +1121,8 @@ SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
||||||
(2424, 160),(2424, 81)
|
(2424, 160),(2424, 81)
|
||||||
(5 rows)
|
(5 rows)
|
||||||
|
|
||||||
-- Test sorting
|
-- Test sorting
|
||||||
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' GROUP BY c ORDER BY c;
|
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' GROUP BY c ORDER BY c;
|
||||||
c
|
c
|
||||||
--------------------------
|
--------------------------
|
||||||
(337, 455),(240, 359)
|
(337, 455),(240, 359)
|
||||||
|
|
|
@ -473,13 +473,13 @@ SELECT cube('{0,1,2}'::float[]);
|
||||||
(0, 1, 2)
|
(0, 1, 2)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
|
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
|
||||||
cube_subset
|
cube_subset
|
||||||
---------------------------
|
---------------------------
|
||||||
(5, 3, 1, 1),(8, 7, 6, 6)
|
(5, 3, 1, 1),(8, 7, 6, 6)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
|
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
|
||||||
ERROR: Index out of bounds
|
ERROR: Index out of bounds
|
||||||
--
|
--
|
||||||
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
|
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
|
||||||
|
@ -1107,11 +1107,11 @@ SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Load some example data and build the index
|
-- Load some example data and build the index
|
||||||
--
|
--
|
||||||
CREATE TABLE test_cube (c cube);
|
CREATE TABLE test_cube (c cube);
|
||||||
\copy test_cube from 'data/test_cube.data'
|
\copy test_cube from 'data/test_cube.data'
|
||||||
CREATE INDEX test_cube_ix ON test_cube USING gist (c);
|
CREATE INDEX test_cube_ix ON test_cube USING gist (c);
|
||||||
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
||||||
c
|
c
|
||||||
--------------------------
|
--------------------------
|
||||||
(337, 455),(240, 359)
|
(337, 455),(240, 359)
|
||||||
|
@ -1121,8 +1121,8 @@ SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
||||||
(2424, 160),(2424, 81)
|
(2424, 160),(2424, 81)
|
||||||
(5 rows)
|
(5 rows)
|
||||||
|
|
||||||
-- Test sorting
|
-- Test sorting
|
||||||
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' GROUP BY c ORDER BY c;
|
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' GROUP BY c ORDER BY c;
|
||||||
c
|
c
|
||||||
--------------------------
|
--------------------------
|
||||||
(337, 455),(240, 359)
|
(337, 455),(240, 359)
|
||||||
|
|
|
@ -473,13 +473,13 @@ SELECT cube('{0,1,2}'::float[]);
|
||||||
(0, 1, 2)
|
(0, 1, 2)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
|
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
|
||||||
cube_subset
|
cube_subset
|
||||||
---------------------------
|
---------------------------
|
||||||
(5, 3, 1, 1),(8, 7, 6, 6)
|
(5, 3, 1, 1),(8, 7, 6, 6)
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
|
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
|
||||||
ERROR: Index out of bounds
|
ERROR: Index out of bounds
|
||||||
--
|
--
|
||||||
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
|
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
|
||||||
|
@ -1107,11 +1107,11 @@ SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Load some example data and build the index
|
-- Load some example data and build the index
|
||||||
--
|
--
|
||||||
CREATE TABLE test_cube (c cube);
|
CREATE TABLE test_cube (c cube);
|
||||||
\copy test_cube from 'data/test_cube.data'
|
\copy test_cube from 'data/test_cube.data'
|
||||||
CREATE INDEX test_cube_ix ON test_cube USING gist (c);
|
CREATE INDEX test_cube_ix ON test_cube USING gist (c);
|
||||||
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
||||||
c
|
c
|
||||||
--------------------------
|
--------------------------
|
||||||
(337, 455),(240, 359)
|
(337, 455),(240, 359)
|
||||||
|
@ -1121,8 +1121,8 @@ SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
||||||
(2424, 160),(2424, 81)
|
(2424, 160),(2424, 81)
|
||||||
(5 rows)
|
(5 rows)
|
||||||
|
|
||||||
-- Test sorting
|
-- Test sorting
|
||||||
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' GROUP BY c ORDER BY c;
|
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' GROUP BY c ORDER BY c;
|
||||||
c
|
c
|
||||||
--------------------------
|
--------------------------
|
||||||
(337, 455),(240, 359)
|
(337, 455),(240, 359)
|
||||||
|
|
|
@ -119,8 +119,8 @@ SELECT cube('{0,1,2}'::float[], '{3,4,5}'::float[]);
|
||||||
SELECT cube('{0,1,2}'::float[], '{3}'::float[]);
|
SELECT cube('{0,1,2}'::float[], '{3}'::float[]);
|
||||||
SELECT cube(NULL::float[], '{3}'::float[]);
|
SELECT cube(NULL::float[], '{3}'::float[]);
|
||||||
SELECT cube('{0,1,2}'::float[]);
|
SELECT cube('{0,1,2}'::float[]);
|
||||||
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
|
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
|
||||||
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
|
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
|
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
|
||||||
|
@ -275,13 +275,13 @@ SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -1, 2);
|
||||||
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
|
SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
|
||||||
|
|
||||||
-- Load some example data and build the index
|
-- Load some example data and build the index
|
||||||
--
|
--
|
||||||
CREATE TABLE test_cube (c cube);
|
CREATE TABLE test_cube (c cube);
|
||||||
|
|
||||||
\copy test_cube from 'data/test_cube.data'
|
\copy test_cube from 'data/test_cube.data'
|
||||||
|
|
||||||
CREATE INDEX test_cube_ix ON test_cube USING gist (c);
|
CREATE INDEX test_cube_ix ON test_cube USING gist (c);
|
||||||
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' ORDER BY c;
|
||||||
|
|
||||||
-- Test sorting
|
-- Test sorting
|
||||||
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' GROUP BY c ORDER BY c;
|
SELECT * FROM test_cube WHERE c && '(3000,1000),(0,0)' GROUP BY c ORDER BY c;
|
||||||
|
|
|
@ -6,8 +6,8 @@ OBJS = dblink.o
|
||||||
SHLIB_LINK = $(libpq)
|
SHLIB_LINK = $(libpq)
|
||||||
SHLIB_PREREQS = submake-libpq
|
SHLIB_PREREQS = submake-libpq
|
||||||
|
|
||||||
DATA_built = dblink.sql
|
DATA_built = dblink.sql
|
||||||
DATA = uninstall_dblink.sql
|
DATA = uninstall_dblink.sql
|
||||||
REGRESS = dblink
|
REGRESS = dblink
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ CREATE OR REPLACE FUNCTION dblink_get_notify(
|
||||||
OUT notify_name TEXT,
|
OUT notify_name TEXT,
|
||||||
OUT be_pid INT4,
|
OUT be_pid INT4,
|
||||||
OUT extra TEXT
|
OUT extra TEXT
|
||||||
)
|
)
|
||||||
RETURNS setof record
|
RETURNS setof record
|
||||||
AS 'MODULE_PATHNAME', 'dblink_get_notify'
|
AS 'MODULE_PATHNAME', 'dblink_get_notify'
|
||||||
LANGUAGE C STRICT;
|
LANGUAGE C STRICT;
|
||||||
|
@ -217,7 +217,7 @@ CREATE OR REPLACE FUNCTION dblink_get_notify(
|
||||||
OUT notify_name TEXT,
|
OUT notify_name TEXT,
|
||||||
OUT be_pid INT4,
|
OUT be_pid INT4,
|
||||||
OUT extra TEXT
|
OUT extra TEXT
|
||||||
)
|
)
|
||||||
RETURNS setof record
|
RETURNS setof record
|
||||||
AS 'MODULE_PATHNAME', 'dblink_get_notify'
|
AS 'MODULE_PATHNAME', 'dblink_get_notify'
|
||||||
LANGUAGE C STRICT;
|
LANGUAGE C STRICT;
|
||||||
|
|
|
@ -668,7 +668,7 @@ SELECT dblink_connect('dtest1', 'dbname=contrib_regression');
|
||||||
OK
|
OK
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT * from
|
SELECT * from
|
||||||
dblink_send_query('dtest1', 'select * from foo where f1 < 3') as t1;
|
dblink_send_query('dtest1', 'select * from foo where f1 < 3') as t1;
|
||||||
t1
|
t1
|
||||||
----
|
----
|
||||||
|
@ -681,7 +681,7 @@ SELECT dblink_connect('dtest2', 'dbname=contrib_regression');
|
||||||
OK
|
OK
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT * from
|
SELECT * from
|
||||||
dblink_send_query('dtest2', 'select * from foo where f1 > 2 and f1 < 7') as t1;
|
dblink_send_query('dtest2', 'select * from foo where f1 > 2 and f1 < 7') as t1;
|
||||||
t1
|
t1
|
||||||
----
|
----
|
||||||
|
@ -694,7 +694,7 @@ SELECT dblink_connect('dtest3', 'dbname=contrib_regression');
|
||||||
OK
|
OK
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT * from
|
SELECT * from
|
||||||
dblink_send_query('dtest3', 'select * from foo where f1 > 6') as t1;
|
dblink_send_query('dtest3', 'select * from foo where f1 > 6') as t1;
|
||||||
t1
|
t1
|
||||||
----
|
----
|
||||||
|
@ -768,7 +768,7 @@ SELECT dblink_connect('dtest1', 'dbname=contrib_regression');
|
||||||
OK
|
OK
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT * from
|
SELECT * from
|
||||||
dblink_send_query('dtest1', 'select * from foo where f1 < 3') as t1;
|
dblink_send_query('dtest1', 'select * from foo where f1 < 3') as t1;
|
||||||
t1
|
t1
|
||||||
----
|
----
|
||||||
|
|
|
@ -327,15 +327,15 @@ SELECT dblink_disconnect('myconn');
|
||||||
|
|
||||||
-- test asynchronous queries
|
-- test asynchronous queries
|
||||||
SELECT dblink_connect('dtest1', 'dbname=contrib_regression');
|
SELECT dblink_connect('dtest1', 'dbname=contrib_regression');
|
||||||
SELECT * from
|
SELECT * from
|
||||||
dblink_send_query('dtest1', 'select * from foo where f1 < 3') as t1;
|
dblink_send_query('dtest1', 'select * from foo where f1 < 3') as t1;
|
||||||
|
|
||||||
SELECT dblink_connect('dtest2', 'dbname=contrib_regression');
|
SELECT dblink_connect('dtest2', 'dbname=contrib_regression');
|
||||||
SELECT * from
|
SELECT * from
|
||||||
dblink_send_query('dtest2', 'select * from foo where f1 > 2 and f1 < 7') as t1;
|
dblink_send_query('dtest2', 'select * from foo where f1 > 2 and f1 < 7') as t1;
|
||||||
|
|
||||||
SELECT dblink_connect('dtest3', 'dbname=contrib_regression');
|
SELECT dblink_connect('dtest3', 'dbname=contrib_regression');
|
||||||
SELECT * from
|
SELECT * from
|
||||||
dblink_send_query('dtest3', 'select * from foo where f1 > 6') as t1;
|
dblink_send_query('dtest3', 'select * from foo where f1 > 6') as t1;
|
||||||
|
|
||||||
CREATE TEMPORARY TABLE result AS
|
CREATE TEMPORARY TABLE result AS
|
||||||
|
@ -364,7 +364,7 @@ SELECT dblink_disconnect('dtest3');
|
||||||
SELECT * from result;
|
SELECT * from result;
|
||||||
|
|
||||||
SELECT dblink_connect('dtest1', 'dbname=contrib_regression');
|
SELECT dblink_connect('dtest1', 'dbname=contrib_regression');
|
||||||
SELECT * from
|
SELECT * from
|
||||||
dblink_send_query('dtest1', 'select * from foo where f1 < 3') as t1;
|
dblink_send_query('dtest1', 'select * from foo where f1 < 3') as t1;
|
||||||
|
|
||||||
SELECT dblink_cancel_query('dtest1');
|
SELECT dblink_cancel_query('dtest1');
|
||||||
|
|
|
@ -35,7 +35,7 @@ CREATE DOMAIN earth AS cube
|
||||||
CONSTRAINT on_surface check(abs(cube_distance(value, '(0)'::cube) /
|
CONSTRAINT on_surface check(abs(cube_distance(value, '(0)'::cube) /
|
||||||
earth() - 1) < '10e-7'::float8);
|
earth() - 1) < '10e-7'::float8);
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION sec_to_gc(float8)
|
CREATE OR REPLACE FUNCTION sec_to_gc(float8)
|
||||||
RETURNS float8
|
RETURNS float8
|
||||||
LANGUAGE SQL
|
LANGUAGE SQL
|
||||||
IMMUTABLE STRICT
|
IMMUTABLE STRICT
|
||||||
|
@ -76,7 +76,7 @@ RETURNS cube
|
||||||
LANGUAGE SQL
|
LANGUAGE SQL
|
||||||
IMMUTABLE STRICT
|
IMMUTABLE STRICT
|
||||||
AS 'SELECT cube_enlarge($1, gc_to_sec($2), 3)';
|
AS 'SELECT cube_enlarge($1, gc_to_sec($2), 3)';
|
||||||
|
|
||||||
--------------- geo_distance
|
--------------- geo_distance
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION geo_distance (point, point)
|
CREATE OR REPLACE FUNCTION geo_distance (point, point)
|
||||||
|
|
|
@ -35,10 +35,10 @@ CREATE OR REPLACE FUNCTION difference(text,text) RETURNS int
|
||||||
AS 'MODULE_PATHNAME', 'difference'
|
AS 'MODULE_PATHNAME', 'difference'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION dmetaphone (text) RETURNS text
|
CREATE OR REPLACE FUNCTION dmetaphone (text) RETURNS text
|
||||||
AS 'MODULE_PATHNAME', 'dmetaphone'
|
AS 'MODULE_PATHNAME', 'dmetaphone'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION dmetaphone_alt (text) RETURNS text
|
CREATE OR REPLACE FUNCTION dmetaphone_alt (text) RETURNS text
|
||||||
AS 'MODULE_PATHNAME', 'dmetaphone_alt'
|
AS 'MODULE_PATHNAME', 'dmetaphone_alt'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
|
@ -438,7 +438,7 @@ select hstore 'a=>NULL, b=>qq' ?& '{}'::text[];
|
||||||
f
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- delete
|
-- delete
|
||||||
select delete('a=>1 , b=>2, c=>3'::hstore, 'a');
|
select delete('a=>1 , b=>2, c=>3'::hstore, 'a');
|
||||||
delete
|
delete
|
||||||
--------------------
|
--------------------
|
||||||
|
|
|
@ -97,7 +97,7 @@ select hstore 'a=>NULL, b=>qq' ?& ARRAY['c','a'];
|
||||||
select hstore 'a=>NULL, b=>qq' ?& ARRAY['c','d'];
|
select hstore 'a=>NULL, b=>qq' ?& ARRAY['c','d'];
|
||||||
select hstore 'a=>NULL, b=>qq' ?& '{}'::text[];
|
select hstore 'a=>NULL, b=>qq' ?& '{}'::text[];
|
||||||
|
|
||||||
-- delete
|
-- delete
|
||||||
|
|
||||||
select delete('a=>1 , b=>2, c=>3'::hstore, 'a');
|
select delete('a=>1 , b=>2, c=>3'::hstore, 'a');
|
||||||
select delete('a=>null , b=>2, c=>3'::hstore, 'a');
|
select delete('a=>null , b=>2, c=>3'::hstore, 'a');
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# contrib/intarray/Makefile
|
# contrib/intarray/Makefile
|
||||||
|
|
||||||
MODULE_big = _int
|
MODULE_big = _int
|
||||||
OBJS = _int_bool.o _int_gist.o _int_op.o _int_tool.o _intbig_gist.o _int_gin.o
|
OBJS = _int_bool.o _int_gist.o _int_op.o _int_tool.o _intbig_gist.o _int_gin.o
|
||||||
DATA_built = _int.sql
|
DATA_built = _int.sql
|
||||||
DATA = uninstall__int.sql
|
DATA = uninstall__int.sql
|
||||||
REGRESS = _int
|
REGRESS = _int
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
# make sure we are in a sane environment.
|
# make sure we are in a sane environment.
|
||||||
|
@ -14,16 +14,16 @@ if ( !( scalar %opt && defined $opt{s} ) ) {
|
||||||
print <<EOT;
|
print <<EOT;
|
||||||
Usage:
|
Usage:
|
||||||
$0 -d DATABASE -s SECTIONS [-b NUMBER] [-v] [-e] [-o] [-r] [-a] [-u]
|
$0 -d DATABASE -s SECTIONS [-b NUMBER] [-v] [-e] [-o] [-r] [-a] [-u]
|
||||||
-d DATABASE -DATABASE
|
-d DATABASE -DATABASE
|
||||||
-b NUMBER -number of repeats
|
-b NUMBER -number of repeats
|
||||||
-s SECTIONS -sections, format sid1[,sid2[,sid3[...]]]]
|
-s SECTIONS -sections, format sid1[,sid2[,sid3[...]]]]
|
||||||
-v -verbose (show SQL)
|
-v -verbose (show SQL)
|
||||||
-e -show explain
|
-e -show explain
|
||||||
-r -use RD-tree index
|
-r -use RD-tree index
|
||||||
-a -AND section
|
-a -AND section
|
||||||
-o -show output
|
-o -show output
|
||||||
-u -unique
|
-u -unique
|
||||||
-c -count
|
-c -count
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
exit;
|
exit;
|
||||||
|
@ -87,19 +87,19 @@ if ( $opt{o} ) {
|
||||||
foreach ( @a ) {
|
foreach ( @a ) {
|
||||||
print "$_->{mid}\t$_->{sections}\n";
|
print "$_->{mid}\t$_->{sections}\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print sprintf("total: %.02f sec; number: %d; for one: %.03f sec; found %d docs\n", $elapsed, $b, $elapsed/$b, $count+1 );
|
print sprintf("total: %.02f sec; number: %d; for one: %.03f sec; found %d docs\n", $elapsed, $b, $elapsed/$b, $count+1 );
|
||||||
$dbi -> disconnect;
|
$dbi -> disconnect;
|
||||||
|
|
||||||
sub exec_sql {
|
sub exec_sql {
|
||||||
my ($dbi, $sql, @keys) = @_;
|
my ($dbi, $sql, @keys) = @_;
|
||||||
my $sth=$dbi->prepare($sql) || die;
|
my $sth=$dbi->prepare($sql) || die;
|
||||||
$sth->execute( @keys ) || die;
|
$sth->execute( @keys ) || die;
|
||||||
my $r;
|
my $r;
|
||||||
my @row;
|
my @row;
|
||||||
while ( defined ( $r=$sth->fetchrow_hashref ) ) {
|
while ( defined ( $r=$sth->fetchrow_hashref ) ) {
|
||||||
push @row, $r;
|
push @row, $r;
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
return @row;
|
return @row;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ create table message (
|
||||||
sections int[]
|
sections int[]
|
||||||
);
|
);
|
||||||
create table message_section_map (
|
create table message_section_map (
|
||||||
mid int not null,
|
mid int not null,
|
||||||
sid int not null
|
sid int not null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ unlink 'message.tmp', 'message_section_map.tmp';
|
||||||
|
|
||||||
sub copytable {
|
sub copytable {
|
||||||
my $t = shift;
|
my $t = shift;
|
||||||
|
|
||||||
print "COPY $t from stdin;\n";
|
print "COPY $t from stdin;\n";
|
||||||
open( FFF, "$t.tmp") || die;
|
open( FFF, "$t.tmp") || die;
|
||||||
while(<FFF>) { print; }
|
while(<FFF>) { print; }
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
* For ISBN with prefix 978
|
* For ISBN with prefix 978
|
||||||
* Range Table as of 2010-Jul-29
|
* Range Table as of 2010-Jul-29
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* where the digit set begins, and how many of them are in the table */
|
/* where the digit set begins, and how many of them are in the table */
|
||||||
const unsigned ISBN_index[10][2] = {
|
const unsigned ISBN_index[10][2] = {
|
||||||
{0, 6},
|
{0, 6},
|
||||||
|
|
|
@ -482,18 +482,18 @@ CREATE OR REPLACE FUNCTION ltree_gist_in(cstring)
|
||||||
RETURNS ltree_gist
|
RETURNS ltree_gist
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C STRICT;
|
LANGUAGE C STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION ltree_gist_out(ltree_gist)
|
CREATE OR REPLACE FUNCTION ltree_gist_out(ltree_gist)
|
||||||
RETURNS cstring
|
RETURNS cstring
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C STRICT;
|
LANGUAGE C STRICT;
|
||||||
|
|
||||||
CREATE TYPE ltree_gist (
|
CREATE TYPE ltree_gist (
|
||||||
internallength = -1,
|
internallength = -1,
|
||||||
input = ltree_gist_in,
|
input = ltree_gist_in,
|
||||||
output = ltree_gist_out,
|
output = ltree_gist_out,
|
||||||
storage = plain
|
storage = plain
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION ltree_consistent(internal,internal,int2,oid,internal)
|
CREATE OR REPLACE FUNCTION ltree_consistent(internal,internal,int2,oid,internal)
|
||||||
|
|
|
@ -110,7 +110,7 @@ DROP FUNCTION ltree_compress(internal);
|
||||||
DROP FUNCTION ltree_consistent(internal,internal,int2,oid,internal);
|
DROP FUNCTION ltree_consistent(internal,internal,int2,oid,internal);
|
||||||
|
|
||||||
DROP TYPE ltree_gist CASCADE;
|
DROP TYPE ltree_gist CASCADE;
|
||||||
|
|
||||||
DROP OPERATOR ^@ (ltxtquery, ltree);
|
DROP OPERATOR ^@ (ltxtquery, ltree);
|
||||||
|
|
||||||
DROP OPERATOR ^@ (ltree, ltxtquery);
|
DROP OPERATOR ^@ (ltree, ltxtquery);
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# contrib/pg_buffercache/Makefile
|
# contrib/pg_buffercache/Makefile
|
||||||
|
|
||||||
MODULE_big = pg_buffercache
|
MODULE_big = pg_buffercache
|
||||||
OBJS = pg_buffercache_pages.o
|
OBJS = pg_buffercache_pages.o
|
||||||
|
|
||||||
DATA_built = pg_buffercache.sql
|
DATA_built = pg_buffercache.sql
|
||||||
DATA = uninstall_pg_buffercache.sql
|
DATA = uninstall_pg_buffercache.sql
|
||||||
|
|
||||||
ifdef USE_PGXS
|
ifdef USE_PGXS
|
||||||
PG_CONFIG = pg_config
|
PG_CONFIG = pg_config
|
||||||
|
|
|
@ -12,9 +12,9 @@ LANGUAGE C;
|
||||||
-- Create a view for convenient access.
|
-- Create a view for convenient access.
|
||||||
CREATE VIEW pg_buffercache AS
|
CREATE VIEW pg_buffercache AS
|
||||||
SELECT P.* FROM pg_buffercache_pages() AS P
|
SELECT P.* FROM pg_buffercache_pages() AS P
|
||||||
(bufferid integer, relfilenode oid, reltablespace oid, reldatabase oid,
|
(bufferid integer, relfilenode oid, reltablespace oid, reldatabase oid,
|
||||||
relforknumber int2, relblocknumber int8, isdirty bool, usagecount int2);
|
relforknumber int2, relblocknumber int8, isdirty bool, usagecount int2);
|
||||||
|
|
||||||
-- Don't want these to be available at public.
|
-- Don't want these to be available at public.
|
||||||
REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;
|
REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;
|
||||||
REVOKE ALL ON pg_buffercache FROM PUBLIC;
|
REVOKE ALL ON pg_buffercache FROM PUBLIC;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# contrib/pg_freespacemap/Makefile
|
# contrib/pg_freespacemap/Makefile
|
||||||
|
|
||||||
MODULE_big = pg_freespacemap
|
MODULE_big = pg_freespacemap
|
||||||
OBJS = pg_freespacemap.o
|
OBJS = pg_freespacemap.o
|
||||||
|
|
||||||
DATA_built = pg_freespacemap.sql
|
DATA_built = pg_freespacemap.sql
|
||||||
DATA = uninstall_pg_freespacemap.sql
|
DATA = uninstall_pg_freespacemap.sql
|
||||||
|
|
||||||
ifdef USE_PGXS
|
ifdef USE_PGXS
|
||||||
PG_CONFIG = pg_config
|
PG_CONFIG = pg_config
|
||||||
|
|
|
@ -59,7 +59,7 @@ CREATE OR REPLACE FUNCTION gtrgm_consistent(internal,text,int,oid,internal)
|
||||||
RETURNS bool
|
RETURNS bool
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gtrgm_compress(internal)
|
CREATE OR REPLACE FUNCTION gtrgm_compress(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
|
|
|
@ -16,7 +16,7 @@ DROP FUNCTION gtrgm_penalty(internal,internal,internal);
|
||||||
DROP FUNCTION gtrgm_decompress(internal);
|
DROP FUNCTION gtrgm_decompress(internal);
|
||||||
|
|
||||||
DROP FUNCTION gtrgm_compress(internal);
|
DROP FUNCTION gtrgm_compress(internal);
|
||||||
|
|
||||||
DROP FUNCTION gtrgm_consistent(internal,text,int,oid,internal);
|
DROP FUNCTION gtrgm_consistent(internal,text,int,oid,internal);
|
||||||
|
|
||||||
DROP TYPE gtrgm CASCADE;
|
DROP TYPE gtrgm CASCADE;
|
||||||
|
|
|
@ -13,7 +13,7 @@ old data. If you have a lot of data, that can take a considerable amount
|
||||||
of time. If you have too much data, you may have to buy more storage
|
of time. If you have too much data, you may have to buy more storage
|
||||||
since you need enough room to hold the original data plus the exported
|
since you need enough room to hold the original data plus the exported
|
||||||
data. pg_upgrade can reduce the amount of time and disk space required
|
data. pg_upgrade can reduce the amount of time and disk space required
|
||||||
for many upgrades.
|
for many upgrades.
|
||||||
|
|
||||||
The URL http://momjian.us/main/writings/pgsql/pg_upgrade.pdf contains a
|
The URL http://momjian.us/main/writings/pgsql/pg_upgrade.pdf contains a
|
||||||
presentation about pg_upgrade internals that mirrors the text
|
presentation about pg_upgrade internals that mirrors the text
|
||||||
|
|
|
@ -35,10 +35,10 @@ Here are the steps needed to create a regression database dump file:
|
||||||
b) For pre-9.0, remove 'regex_flavor'
|
b) For pre-9.0, remove 'regex_flavor'
|
||||||
|
|
||||||
f) For pre-9.0, adjust extra_float_digits
|
f) For pre-9.0, adjust extra_float_digits
|
||||||
Postgres 9.0 pg_dump uses extra_float_digits=-2 for pre-9.0
|
Postgres 9.0 pg_dump uses extra_float_digits=-2 for pre-9.0
|
||||||
databases, and extra_float_digits=-3 for >= 9.0 databases.
|
databases, and extra_float_digits=-3 for >= 9.0 databases.
|
||||||
It is necessary to modify 9.0 pg_dump to always use -3, and
|
It is necessary to modify 9.0 pg_dump to always use -3, and
|
||||||
modify the pre-9.0 old server to accept extra_float_digits=-3.
|
modify the pre-9.0 old server to accept extra_float_digits=-3.
|
||||||
|
|
||||||
Once the dump is created, it can be repeatedly loaded into the old
|
Once the dump is created, it can be repeatedly loaded into the old
|
||||||
database, upgraded, and dumped out of the new database, and then
|
database, upgraded, and dumped out of the new database, and then
|
||||||
|
@ -52,7 +52,7 @@ steps:
|
||||||
|
|
||||||
3) Create the regression database in the old server.
|
3) Create the regression database in the old server.
|
||||||
|
|
||||||
4) Load the dump file created above into the regression database;
|
4) Load the dump file created above into the regression database;
|
||||||
check for errors while loading.
|
check for errors while loading.
|
||||||
|
|
||||||
5) Upgrade the old database to the new major version, as outlined in
|
5) Upgrade the old database to the new major version, as outlined in
|
||||||
|
|
|
@ -171,7 +171,7 @@ transfer_single_new_db(pageCnvCtx *pageConverter,
|
||||||
namelist[fileno]->d_name);
|
namelist[fileno]->d_name);
|
||||||
snprintf(new_file, sizeof(new_file), "%s/%u%s", maps[mapnum].new_dir,
|
snprintf(new_file, sizeof(new_file), "%s/%u%s", maps[mapnum].new_dir,
|
||||||
maps[mapnum].new_relfilenode, strchr(namelist[fileno]->d_name, '_'));
|
maps[mapnum].new_relfilenode, strchr(namelist[fileno]->d_name, '_'));
|
||||||
|
|
||||||
unlink(new_file);
|
unlink(new_file);
|
||||||
transfer_relfile(pageConverter, old_file, new_file,
|
transfer_relfile(pageConverter, old_file, new_file,
|
||||||
maps[mapnum].old_nspname, maps[mapnum].old_relname,
|
maps[mapnum].old_nspname, maps[mapnum].old_relname,
|
||||||
|
|
|
@ -108,7 +108,7 @@ decode('37363534333231204e6f77206973207468652074696d6520666f722000', 'hex'),
|
||||||
3ea6357a0ee7fad6d0c4b63464f2aafa40c2e91b4b7e1bba8114932fd92b5c8f111e7e50e7b2e541
|
3ea6357a0ee7fad6d0c4b63464f2aafa40c2e91b4b7e1bba8114932fd92b5c8f111e7e50e7b2e541
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- blowfish-448
|
-- blowfish-448
|
||||||
SELECT encode(encrypt(
|
SELECT encode(encrypt(
|
||||||
decode('fedcba9876543210', 'hex'),
|
decode('fedcba9876543210', 'hex'),
|
||||||
decode('f0e1d2c3b4a5968778695a4b3c2d1e0f001122334455667704689104c2fd3b2f584023641aba61761f1f1f1f0e0e0e0effffffffffffffff', 'hex'),
|
decode('f0e1d2c3b4a5968778695a4b3c2d1e0f001122334455667704689104c2fd3b2f584023641aba61761f1f1f1f0e0e0e0effffffffffffffff', 'hex'),
|
||||||
|
@ -120,21 +120,21 @@ decode('f0e1d2c3b4a5968778695a4b3c2d1e0f001122334455667704689104c2fd3b2f58402364
|
||||||
|
|
||||||
-- result: c04504012e4e1f53
|
-- result: c04504012e4e1f53
|
||||||
-- empty data
|
-- empty data
|
||||||
select encode( encrypt('', 'foo', 'bf'), 'hex');
|
select encode(encrypt('', 'foo', 'bf'), 'hex');
|
||||||
encode
|
encode
|
||||||
------------------
|
------------------
|
||||||
1871949bb2311c8e
|
1871949bb2311c8e
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- 10 bytes key
|
-- 10 bytes key
|
||||||
select encode( encrypt('foo', '0123456789', 'bf'), 'hex');
|
select encode(encrypt('foo', '0123456789', 'bf'), 'hex');
|
||||||
encode
|
encode
|
||||||
------------------
|
------------------
|
||||||
42f58af3b2c03f46
|
42f58af3b2c03f46
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- 22 bytes key
|
-- 22 bytes key
|
||||||
select encode( encrypt('foo', '0123456789012345678901', 'bf'), 'hex');
|
select encode(encrypt('foo', '0123456789012345678901', 'bf'), 'hex');
|
||||||
encode
|
encode
|
||||||
------------------
|
------------------
|
||||||
86ab6f0bc72b5f22
|
86ab6f0bc72b5f22
|
||||||
|
|
|
@ -17,7 +17,7 @@ CREATE TABLE ctest (data text, res text, salt text);
|
||||||
INSERT INTO ctest VALUES ('password', '', '');
|
INSERT INTO ctest VALUES ('password', '', '');
|
||||||
UPDATE ctest SET salt = gen_salt('bf', 8);
|
UPDATE ctest SET salt = gen_salt('bf', 8);
|
||||||
UPDATE ctest SET res = crypt(data, salt);
|
UPDATE ctest SET res = crypt(data, salt);
|
||||||
SELECT res = crypt(data, res) AS "worked"
|
SELECT res = crypt(data, res) AS "worked"
|
||||||
FROM ctest;
|
FROM ctest;
|
||||||
worked
|
worked
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -70,21 +70,21 @@ decode('000102030405060708090a0b0c0d0e0f101112131415161718191a1b', 'hex'),
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- empty data
|
-- empty data
|
||||||
select encode( encrypt('', 'foo', 'aes'), 'hex');
|
select encode(encrypt('', 'foo', 'aes'), 'hex');
|
||||||
encode
|
encode
|
||||||
----------------------------------
|
----------------------------------
|
||||||
b48cc3338a2eb293b6007ef72c360d48
|
b48cc3338a2eb293b6007ef72c360d48
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- 10 bytes key
|
-- 10 bytes key
|
||||||
select encode( encrypt('foo', '0123456789', 'aes'), 'hex');
|
select encode(encrypt('foo', '0123456789', 'aes'), 'hex');
|
||||||
encode
|
encode
|
||||||
----------------------------------
|
----------------------------------
|
||||||
f397f03d2819b7172b68d0706fda4693
|
f397f03d2819b7172b68d0706fda4693
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- 22 bytes key
|
-- 22 bytes key
|
||||||
select encode( encrypt('foo', '0123456789012345678901', 'aes'), 'hex');
|
select encode(encrypt('foo', '0123456789012345678901', 'aes'), 'hex');
|
||||||
encode
|
encode
|
||||||
----------------------------------
|
----------------------------------
|
||||||
5c9db77af02b4678117bcd8a71ae7f53
|
5c9db77af02b4678117bcd8a71ae7f53
|
||||||
|
@ -105,7 +105,7 @@ select encode(encrypt_iv('foo', '0123456', 'abcd', 'aes'), 'hex');
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select decrypt_iv(decode('2c24cb7da91d6d5699801268b0f5adad', 'hex'),
|
select decrypt_iv(decode('2c24cb7da91d6d5699801268b0f5adad', 'hex'),
|
||||||
'0123456', 'abcd', 'aes');
|
'0123456', 'abcd', 'aes');
|
||||||
decrypt_iv
|
decrypt_iv
|
||||||
------------
|
------------
|
||||||
foo
|
foo
|
||||||
|
|
|
@ -1133,6 +1133,6 @@ static const u4byte il_tab[4][256] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const u4byte rco_tab[10] = {
|
static const u4byte rco_tab[10] = {
|
||||||
0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010,
|
0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010,
|
||||||
0x00000020, 0x00000040, 0x00000080, 0x0000001b, 0x00000036
|
0x00000020, 0x00000040, 0x00000080, 0x0000001b, 0x00000036
|
||||||
};
|
};
|
||||||
|
|
|
@ -66,7 +66,7 @@ decode('6b77b4d63006dee605b156e27403979358deb9e7154616d959f1652bd5ff92cc', 'hex'
|
||||||
decode('37363534333231204e6f77206973207468652074696d6520666f722000', 'hex'),
|
decode('37363534333231204e6f77206973207468652074696d6520666f722000', 'hex'),
|
||||||
'bf-cbc'), 'hex');
|
'bf-cbc'), 'hex');
|
||||||
|
|
||||||
-- blowfish-448
|
-- blowfish-448
|
||||||
SELECT encode(encrypt(
|
SELECT encode(encrypt(
|
||||||
decode('fedcba9876543210', 'hex'),
|
decode('fedcba9876543210', 'hex'),
|
||||||
decode('f0e1d2c3b4a5968778695a4b3c2d1e0f001122334455667704689104c2fd3b2f584023641aba61761f1f1f1f0e0e0e0effffffffffffffff', 'hex'),
|
decode('f0e1d2c3b4a5968778695a4b3c2d1e0f001122334455667704689104c2fd3b2f584023641aba61761f1f1f1f0e0e0e0effffffffffffffff', 'hex'),
|
||||||
|
@ -74,11 +74,11 @@ decode('f0e1d2c3b4a5968778695a4b3c2d1e0f001122334455667704689104c2fd3b2f58402364
|
||||||
-- result: c04504012e4e1f53
|
-- result: c04504012e4e1f53
|
||||||
|
|
||||||
-- empty data
|
-- empty data
|
||||||
select encode( encrypt('', 'foo', 'bf'), 'hex');
|
select encode(encrypt('', 'foo', 'bf'), 'hex');
|
||||||
-- 10 bytes key
|
-- 10 bytes key
|
||||||
select encode( encrypt('foo', '0123456789', 'bf'), 'hex');
|
select encode(encrypt('foo', '0123456789', 'bf'), 'hex');
|
||||||
-- 22 bytes key
|
-- 22 bytes key
|
||||||
select encode( encrypt('foo', '0123456789012345678901', 'bf'), 'hex');
|
select encode(encrypt('foo', '0123456789012345678901', 'bf'), 'hex');
|
||||||
|
|
||||||
-- decrypt
|
-- decrypt
|
||||||
select decrypt(encrypt('foo', '0123456', 'bf'), '0123456', 'bf');
|
select decrypt(encrypt('foo', '0123456', 'bf'), '0123456', 'bf');
|
||||||
|
|
|
@ -11,7 +11,7 @@ INSERT INTO ctest VALUES ('password', '', '');
|
||||||
|
|
||||||
UPDATE ctest SET salt = gen_salt('bf', 8);
|
UPDATE ctest SET salt = gen_salt('bf', 8);
|
||||||
UPDATE ctest SET res = crypt(data, salt);
|
UPDATE ctest SET res = crypt(data, salt);
|
||||||
SELECT res = crypt(data, res) AS "worked"
|
SELECT res = crypt(data, res) AS "worked"
|
||||||
FROM ctest;
|
FROM ctest;
|
||||||
|
|
||||||
DROP TABLE ctest;
|
DROP TABLE ctest;
|
||||||
|
|
|
@ -44,11 +44,11 @@ decode('000102030405060708090a0b0c0d0e0f101112131415161718191a1b', 'hex'),
|
||||||
'aes-cbc'), 'hex');
|
'aes-cbc'), 'hex');
|
||||||
|
|
||||||
-- empty data
|
-- empty data
|
||||||
select encode( encrypt('', 'foo', 'aes'), 'hex');
|
select encode(encrypt('', 'foo', 'aes'), 'hex');
|
||||||
-- 10 bytes key
|
-- 10 bytes key
|
||||||
select encode( encrypt('foo', '0123456789', 'aes'), 'hex');
|
select encode(encrypt('foo', '0123456789', 'aes'), 'hex');
|
||||||
-- 22 bytes key
|
-- 22 bytes key
|
||||||
select encode( encrypt('foo', '0123456789012345678901', 'aes'), 'hex');
|
select encode(encrypt('foo', '0123456789012345678901', 'aes'), 'hex');
|
||||||
|
|
||||||
-- decrypt
|
-- decrypt
|
||||||
select decrypt(encrypt('foo', '0123456', 'aes'), '0123456', 'aes');
|
select decrypt(encrypt('foo', '0123456', 'aes'), '0123456', 'aes');
|
||||||
|
@ -56,7 +56,7 @@ select decrypt(encrypt('foo', '0123456', 'aes'), '0123456', 'aes');
|
||||||
-- iv
|
-- iv
|
||||||
select encode(encrypt_iv('foo', '0123456', 'abcd', 'aes'), 'hex');
|
select encode(encrypt_iv('foo', '0123456', 'abcd', 'aes'), 'hex');
|
||||||
select decrypt_iv(decode('2c24cb7da91d6d5699801268b0f5adad', 'hex'),
|
select decrypt_iv(decode('2c24cb7da91d6d5699801268b0f5adad', 'hex'),
|
||||||
'0123456', 'abcd', 'aes');
|
'0123456', 'abcd', 'aes');
|
||||||
|
|
||||||
-- long message
|
-- long message
|
||||||
select encode(encrypt('Lets try a longer message.', '0123456789', 'aes'), 'hex');
|
select encode(encrypt('Lets try a longer message.', '0123456789', 'aes'), 'hex');
|
||||||
|
|
|
@ -924,7 +924,7 @@ SELECT '1'::seg <@ '-1 .. 1'::seg AS bool;
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Load some example data and build the index
|
-- Load some example data and build the index
|
||||||
--
|
--
|
||||||
CREATE TABLE test_seg (s seg);
|
CREATE TABLE test_seg (s seg);
|
||||||
\copy test_seg from 'data/test_seg.data'
|
\copy test_seg from 'data/test_seg.data'
|
||||||
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
||||||
|
@ -934,7 +934,7 @@ SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
||||||
143
|
143
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Test sorting
|
-- Test sorting
|
||||||
SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s;
|
SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s;
|
||||||
s
|
s
|
||||||
-----------------
|
-----------------
|
||||||
|
|
|
@ -924,7 +924,7 @@ SELECT '1'::seg <@ '-1 .. 1'::seg AS bool;
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Load some example data and build the index
|
-- Load some example data and build the index
|
||||||
--
|
--
|
||||||
CREATE TABLE test_seg (s seg);
|
CREATE TABLE test_seg (s seg);
|
||||||
\copy test_seg from 'data/test_seg.data'
|
\copy test_seg from 'data/test_seg.data'
|
||||||
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
||||||
|
@ -934,7 +934,7 @@ SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
||||||
143
|
143
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Test sorting
|
-- Test sorting
|
||||||
SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s;
|
SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s;
|
||||||
s
|
s
|
||||||
-----------------
|
-----------------
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
SET search_path = public;
|
SET search_path = public;
|
||||||
|
|
||||||
-- Create the user-defined type for 1-D floating point intervals (seg)
|
-- Create the user-defined type for 1-D floating point intervals (seg)
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION seg_in(cstring)
|
CREATE OR REPLACE FUNCTION seg_in(cstring)
|
||||||
RETURNS seg
|
RETURNS seg
|
||||||
|
@ -333,12 +333,12 @@ AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gseg_compress(internal)
|
CREATE OR REPLACE FUNCTION gseg_compress(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gseg_decompress(internal)
|
CREATE OR REPLACE FUNCTION gseg_decompress(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
|
@ -353,12 +353,12 @@ AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gseg_union(internal, internal)
|
CREATE OR REPLACE FUNCTION gseg_union(internal, internal)
|
||||||
RETURNS seg
|
RETURNS seg
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION gseg_same(seg, seg, internal)
|
CREATE OR REPLACE FUNCTION gseg_same(seg, seg, internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C IMMUTABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ CREATE OPERATOR CLASS seg_ops
|
||||||
FUNCTION 1 seg_cmp(seg, seg);
|
FUNCTION 1 seg_cmp(seg, seg);
|
||||||
|
|
||||||
CREATE OPERATOR CLASS gist_seg_ops
|
CREATE OPERATOR CLASS gist_seg_ops
|
||||||
DEFAULT FOR TYPE seg USING gist
|
DEFAULT FOR TYPE seg USING gist
|
||||||
AS
|
AS
|
||||||
OPERATOR 1 << ,
|
OPERATOR 1 << ,
|
||||||
OPERATOR 2 &< ,
|
OPERATOR 2 &< ,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
%{
|
%{
|
||||||
#define YYPARSE_PARAM result /* need this to pass a pointer (void *) to yyparse */
|
#define YYPARSE_PARAM result /* need this to pass a pointer (void *) to yyparse */
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
extern int seg_yylex(void);
|
extern int seg_yylex(void);
|
||||||
|
|
||||||
extern int significant_digits(char *str); /* defined in seg.c */
|
extern int significant_digits(char *str); /* defined in seg.c */
|
||||||
|
|
||||||
void seg_yyerror(const char *message);
|
void seg_yyerror(const char *message);
|
||||||
int seg_yyparse(void *result);
|
int seg_yyparse(void *result);
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ boundary:
|
||||||
$$.sigd = significant_digits($1);
|
$$.sigd = significant_digits($1);
|
||||||
$$.val = val;
|
$$.val = val;
|
||||||
}
|
}
|
||||||
|
|
|
|
||||||
EXTENSION SEGFLOAT {
|
EXTENSION SEGFLOAT {
|
||||||
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
|
/* temp variable avoids a gcc 3.3.x bug on Sparc64 */
|
||||||
float val = seg_atof($2);
|
float val = seg_atof($2);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%{
|
%{
|
||||||
/*
|
/*
|
||||||
** A scanner for EMP-style numeric ranges
|
* A scanner for EMP-style numeric ranges
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ while (<>) {
|
||||||
push @rows, $_;
|
push @rows, $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( sort {
|
foreach ( sort {
|
||||||
@ar = split("\t", $a);
|
@ar = split("\t", $a);
|
||||||
$valA = pop @ar;
|
$valA = pop @ar;
|
||||||
$valA =~ s/[~<> ]+//g;
|
$valA =~ s/[~<> ]+//g;
|
||||||
|
|
|
@ -213,7 +213,7 @@ SELECT '-1'::seg <@ '-1 .. 1'::seg AS bool;
|
||||||
SELECT '1'::seg <@ '-1 .. 1'::seg AS bool;
|
SELECT '1'::seg <@ '-1 .. 1'::seg AS bool;
|
||||||
|
|
||||||
-- Load some example data and build the index
|
-- Load some example data and build the index
|
||||||
--
|
--
|
||||||
CREATE TABLE test_seg (s seg);
|
CREATE TABLE test_seg (s seg);
|
||||||
|
|
||||||
\copy test_seg from 'data/test_seg.data'
|
\copy test_seg from 'data/test_seg.data'
|
||||||
|
@ -221,7 +221,7 @@ CREATE TABLE test_seg (s seg);
|
||||||
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
CREATE INDEX test_seg_ix ON test_seg USING gist (s);
|
||||||
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
SELECT count(*) FROM test_seg WHERE s @> '11..11.3';
|
||||||
|
|
||||||
-- Test sorting
|
-- Test sorting
|
||||||
SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s;
|
SELECT * FROM test_seg WHERE s @> '11..11.3' GROUP BY s;
|
||||||
|
|
||||||
-- Test functions
|
-- Test functions
|
||||||
|
|
|
@ -8,9 +8,9 @@ CREATE TABLE ids (
|
||||||
idesc text
|
idesc text
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TRIGGER ids_nextid
|
CREATE TRIGGER ids_nextid
|
||||||
BEFORE INSERT OR UPDATE ON ids
|
BEFORE INSERT OR UPDATE ON ids
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
EXECUTE PROCEDURE autoinc (id, next_id);
|
EXECUTE PROCEDURE autoinc (id, next_id);
|
||||||
|
|
||||||
INSERT INTO ids VALUES (0, 'first (-2 ?)');
|
INSERT INTO ids VALUES (0, 'first (-2 ?)');
|
||||||
|
@ -19,11 +19,11 @@ INSERT INTO ids(idesc) VALUES ('third (1 ?!)');
|
||||||
|
|
||||||
SELECT * FROM ids;
|
SELECT * FROM ids;
|
||||||
|
|
||||||
UPDATE ids SET id = null, idesc = 'first: -2 --> 2'
|
UPDATE ids SET id = null, idesc = 'first: -2 --> 2'
|
||||||
WHERE idesc = 'first (-2 ?)';
|
WHERE idesc = 'first (-2 ?)';
|
||||||
UPDATE ids SET id = 0, idesc = 'second: -1 --> 3'
|
UPDATE ids SET id = 0, idesc = 'second: -1 --> 3'
|
||||||
WHERE id = -1;
|
WHERE id = -1;
|
||||||
UPDATE ids SET id = 4, idesc = 'third: 1 --> 4'
|
UPDATE ids SET id = 4, idesc = 'third: 1 --> 4'
|
||||||
WHERE id = 1;
|
WHERE id = 1;
|
||||||
|
|
||||||
SELECT * FROM ids;
|
SELECT * FROM ids;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
-- Adjust this setting to control where the objects get created.
|
-- Adjust this setting to control where the objects get created.
|
||||||
SET search_path = public;
|
SET search_path = public;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION autoinc()
|
CREATE OR REPLACE FUNCTION autoinc()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
|
@ -7,7 +7,7 @@ CREATE TABLE username_test (
|
||||||
|
|
||||||
CREATE TRIGGER insert_usernames
|
CREATE TRIGGER insert_usernames
|
||||||
BEFORE INSERT OR UPDATE ON username_test
|
BEFORE INSERT OR UPDATE ON username_test
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
EXECUTE PROCEDURE insert_username (username);
|
EXECUTE PROCEDURE insert_username (username);
|
||||||
|
|
||||||
INSERT INTO username_test VALUES ('nothing');
|
INSERT INTO username_test VALUES ('nothing');
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
-- Adjust this setting to control where the objects get created.
|
-- Adjust this setting to control where the objects get created.
|
||||||
SET search_path = public;
|
SET search_path = public;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION insert_username()
|
CREATE OR REPLACE FUNCTION insert_username()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
|
@ -8,7 +8,7 @@ CREATE TABLE mdt (
|
||||||
|
|
||||||
CREATE TRIGGER mdt_moddatetime
|
CREATE TRIGGER mdt_moddatetime
|
||||||
BEFORE UPDATE ON mdt
|
BEFORE UPDATE ON mdt
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
EXECUTE PROCEDURE moddatetime (moddate);
|
EXECUTE PROCEDURE moddatetime (moddate);
|
||||||
|
|
||||||
INSERT INTO mdt VALUES (1, 'first');
|
INSERT INTO mdt VALUES (1, 'first');
|
||||||
|
|
|
@ -20,11 +20,11 @@ CREATE INDEX CI ON C (REFC);
|
||||||
--Trigger for table A:
|
--Trigger for table A:
|
||||||
|
|
||||||
CREATE TRIGGER AT BEFORE DELETE OR UPDATE ON A FOR EACH ROW
|
CREATE TRIGGER AT BEFORE DELETE OR UPDATE ON A FOR EACH ROW
|
||||||
EXECUTE PROCEDURE
|
EXECUTE PROCEDURE
|
||||||
check_foreign_key (2, 'cascade', 'ID', 'B', 'REFB', 'C', 'REFC');
|
check_foreign_key (2, 'cascade', 'ID', 'B', 'REFB', 'C', 'REFC');
|
||||||
/*
|
/*
|
||||||
2 - means that check must be performed for foreign keys of 2 tables.
|
2 - means that check must be performed for foreign keys of 2 tables.
|
||||||
cascade - defines that corresponding keys must be deleted.
|
cascade - defines that corresponding keys must be deleted.
|
||||||
ID - name of primary key column in triggered table (A). You may
|
ID - name of primary key column in triggered table (A). You may
|
||||||
use as many columns as you need.
|
use as many columns as you need.
|
||||||
B - name of (first) table with foreign keys.
|
B - name of (first) table with foreign keys.
|
||||||
|
@ -38,11 +38,11 @@ REFC - name of foreign key column in this table.
|
||||||
--Trigger for table B:
|
--Trigger for table B:
|
||||||
|
|
||||||
CREATE TRIGGER BT BEFORE INSERT OR UPDATE ON B FOR EACH ROW
|
CREATE TRIGGER BT BEFORE INSERT OR UPDATE ON B FOR EACH ROW
|
||||||
EXECUTE PROCEDURE
|
EXECUTE PROCEDURE
|
||||||
check_primary_key ('REFB', 'A', 'ID');
|
check_primary_key ('REFB', 'A', 'ID');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
REFB - name of foreign key column in triggered (B) table. You may use as
|
REFB - name of foreign key column in triggered (B) table. You may use as
|
||||||
many columns as you need, but number of key columns in referenced
|
many columns as you need, but number of key columns in referenced
|
||||||
table must be the same.
|
table must be the same.
|
||||||
A - referenced table name.
|
A - referenced table name.
|
||||||
|
@ -52,7 +52,7 @@ ID - name of primary key column in referenced table.
|
||||||
--Trigger for table C:
|
--Trigger for table C:
|
||||||
|
|
||||||
CREATE TRIGGER CT BEFORE INSERT OR UPDATE ON C FOR EACH ROW
|
CREATE TRIGGER CT BEFORE INSERT OR UPDATE ON C FOR EACH ROW
|
||||||
EXECUTE PROCEDURE
|
EXECUTE PROCEDURE
|
||||||
check_primary_key ('REFC', 'A', 'ID');
|
check_primary_key ('REFC', 'A', 'ID');
|
||||||
|
|
||||||
-- Now try
|
-- Now try
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
drop table tttest;
|
drop table tttest;
|
||||||
|
|
||||||
create table tttest (
|
create table tttest (
|
||||||
price_id int4,
|
price_id int4,
|
||||||
price_val int4,
|
price_val int4,
|
||||||
price_on abstime,
|
price_on abstime,
|
||||||
price_off abstime
|
price_off abstime
|
||||||
);
|
);
|
||||||
|
@ -12,17 +12,17 @@ alter table tttest add column q1 text;
|
||||||
alter table tttest add column q2 int;
|
alter table tttest add column q2 int;
|
||||||
alter table tttest drop column q1;
|
alter table tttest drop column q1;
|
||||||
|
|
||||||
create trigger timetravel
|
create trigger timetravel
|
||||||
before insert or delete or update on tttest
|
before insert or delete or update on tttest
|
||||||
for each row
|
for each row
|
||||||
execute procedure
|
execute procedure
|
||||||
timetravel (price_on, price_off);
|
timetravel (price_on, price_off);
|
||||||
|
|
||||||
insert into tttest values (1, 1, null, null);
|
insert into tttest values (1, 1, null, null);
|
||||||
insert into tttest(price_id, price_val) values (2, 2);
|
insert into tttest(price_id, price_val) values (2, 2);
|
||||||
insert into tttest(price_id, price_val,price_off) values (3, 3, 'infinity');
|
insert into tttest(price_id, price_val,price_off) values (3, 3, 'infinity');
|
||||||
|
|
||||||
insert into tttest(price_id, price_val,price_off) values (4, 4,
|
insert into tttest(price_id, price_val,price_off) values (4, 4,
|
||||||
abstime('now'::timestamp - '100 days'::interval));
|
abstime('now'::timestamp - '100 days'::interval));
|
||||||
insert into tttest(price_id, price_val,price_on) values (3, 3, 'infinity'); -- duplicate key
|
insert into tttest(price_id, price_val,price_on) values (3, 3, 'infinity'); -- duplicate key
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ select set_timetravel('tttest', 1); -- turn TT ON!
|
||||||
select get_timetravel('tttest'); -- check status
|
select get_timetravel('tttest'); -- check status
|
||||||
|
|
||||||
-- we want to correct some date
|
-- we want to correct some date
|
||||||
update tttest set price_on = 'Jan-01-1990 00:00:01' where price_id = 5 and
|
update tttest set price_on = 'Jan-01-1990 00:00:01' where price_id = 5 and
|
||||||
price_off <> 'infinity';
|
price_off <> 'infinity';
|
||||||
-- but this doesn't work
|
-- but this doesn't work
|
||||||
|
|
||||||
|
@ -71,11 +71,11 @@ select set_timetravel('tttest', 0); -- turn TT OFF!
|
||||||
|
|
||||||
select get_timetravel('tttest'); -- check status
|
select get_timetravel('tttest'); -- check status
|
||||||
|
|
||||||
update tttest set price_on = '01-Jan-1990 00:00:01' where price_id = 5 and
|
update tttest set price_on = '01-Jan-1990 00:00:01' where price_id = 5 and
|
||||||
price_off <> 'infinity';
|
price_off <> 'infinity';
|
||||||
select * from tttest;
|
select * from tttest;
|
||||||
-- isn't it what we need ?
|
-- isn't it what we need ?
|
||||||
|
|
||||||
-- get price for price_id == 5 as it was '10-Jan-1990'
|
-- get price for price_id == 5 as it was '10-Jan-1990'
|
||||||
select * from tttest where price_id = 5 and
|
select * from tttest where price_id = 5 and
|
||||||
price_on <= '10-Jan-1990' and price_off > '10-Jan-1990';
|
price_on <= '10-Jan-1990' and price_off > '10-Jan-1990';
|
||||||
|
|
|
@ -3,17 +3,17 @@
|
||||||
-- Adjust this setting to control where the objects get created.
|
-- Adjust this setting to control where the objects get created.
|
||||||
SET search_path = public;
|
SET search_path = public;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION timetravel()
|
CREATE OR REPLACE FUNCTION timetravel()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION set_timetravel(name, int4)
|
CREATE OR REPLACE FUNCTION set_timetravel(name, int4)
|
||||||
RETURNS int4
|
RETURNS int4
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C RETURNS NULL ON NULL INPUT;
|
LANGUAGE C RETURNS NULL ON NULL INPUT;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION get_timetravel(name)
|
CREATE OR REPLACE FUNCTION get_timetravel(name)
|
||||||
RETURNS int4
|
RETURNS int4
|
||||||
AS 'MODULE_PATHNAME'
|
AS 'MODULE_PATHNAME'
|
||||||
LANGUAGE C RETURNS NULL ON NULL INPUT;
|
LANGUAGE C RETURNS NULL ON NULL INPUT;
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
#
|
#
|
||||||
# Created by David Wheeler, 2002.
|
# Created by David Wheeler, 2002.
|
||||||
|
|
||||||
# modified by Ray Aspeitia 12-03-2003 :
|
# modified by Ray Aspeitia 12-03-2003 :
|
||||||
# added log rotation script to db startup
|
# added log rotation script to db startup
|
||||||
# modified StartupParameters.plist "Provides" parameter to make it easier to
|
# modified StartupParameters.plist "Provides" parameter to make it easier to
|
||||||
# start and stop with the SystemStarter utitlity
|
# start and stop with the SystemStarter utitlity
|
||||||
|
|
||||||
# use the below command in order to correctly start/stop/restart PG with log rotation script:
|
# use the below command in order to correctly start/stop/restart PG with log rotation script:
|
||||||
|
|
|
@ -41,7 +41,7 @@ SELECT to_tsquery('testcfg', 'star');
|
||||||
'star'
|
'star'
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT ts_headline('testcfg','Supernovae stars are the brightest phenomena in galaxies',
|
SELECT ts_headline('testcfg','Supernovae stars are the brightest phenomena in galaxies',
|
||||||
to_tsquery('testcfg', 'stars'));
|
to_tsquery('testcfg', 'stars'));
|
||||||
ts_headline
|
ts_headline
|
||||||
-----------------------------------------------------------------
|
-----------------------------------------------------------------
|
||||||
|
|
|
@ -22,5 +22,5 @@ SELECT to_tsvector('testcfg','That''s my first own parser');
|
||||||
|
|
||||||
SELECT to_tsquery('testcfg', 'star');
|
SELECT to_tsquery('testcfg', 'star');
|
||||||
|
|
||||||
SELECT ts_headline('testcfg','Supernovae stars are the brightest phenomena in galaxies',
|
SELECT ts_headline('testcfg','Supernovae stars are the brightest phenomena in galaxies',
|
||||||
to_tsquery('testcfg', 'stars'));
|
to_tsquery('testcfg', 'stars'));
|
||||||
|
|
|
@ -815,13 +815,13 @@ SELECT length(to_tsvector('english', '345 qwe@efd.r '' http://www.com/ http://ae
|
||||||
53
|
53
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select to_tsquery('english', 'qwe & sKies ');
|
select to_tsquery('english', 'qwe & sKies ');
|
||||||
to_tsquery
|
to_tsquery
|
||||||
---------------
|
---------------
|
||||||
'qwe' & 'sky'
|
'qwe' & 'sky'
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select to_tsquery('simple', 'qwe & sKies ');
|
select to_tsquery('simple', 'qwe & sKies ');
|
||||||
to_tsquery
|
to_tsquery
|
||||||
-----------------
|
-----------------
|
||||||
'qwe' & 'skies'
|
'qwe' & 'skies'
|
||||||
|
@ -2337,7 +2337,6 @@ Upon a woman s face. E. J. Pratt (1882 1964)
|
||||||
The granite features of this cliff
|
The granite features of this cliff
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
|
||||||
select headline('Erosion It took the sea a thousand years,
|
select headline('Erosion It took the sea a thousand years,
|
||||||
A thousand years to trace
|
A thousand years to trace
|
||||||
The granite features of this cliff
|
The granite features of this cliff
|
||||||
|
@ -2354,7 +2353,6 @@ Upon a woman s face. E. J. Pratt (1882 1964)
|
||||||
The <b>granite</b> features of this cliff
|
The <b>granite</b> features of this cliff
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
|
||||||
select headline('Erosion It took the sea a thousand years,
|
select headline('Erosion It took the sea a thousand years,
|
||||||
A thousand years to trace
|
A thousand years to trace
|
||||||
The granite features of this cliff
|
The granite features of this cliff
|
||||||
|
@ -2382,7 +2380,7 @@ ff-bg
|
||||||
document.write(15);
|
document.write(15);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>',
|
</html>',
|
||||||
to_tsquery('sea&foo'), 'HighlightAll=true');
|
to_tsquery('sea&foo'), 'HighlightAll=true');
|
||||||
headline
|
headline
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -815,13 +815,13 @@ SELECT length(to_tsvector('english', '345 qwe@efd.r '' http://www.com/ http://ae
|
||||||
53
|
53
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select to_tsquery('english', 'qwe & sKies ');
|
select to_tsquery('english', 'qwe & sKies ');
|
||||||
to_tsquery
|
to_tsquery
|
||||||
---------------
|
---------------
|
||||||
'qwe' & 'sky'
|
'qwe' & 'sky'
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select to_tsquery('simple', 'qwe & sKies ');
|
select to_tsquery('simple', 'qwe & sKies ');
|
||||||
to_tsquery
|
to_tsquery
|
||||||
-----------------
|
-----------------
|
||||||
'qwe' & 'skies'
|
'qwe' & 'skies'
|
||||||
|
@ -2337,7 +2337,6 @@ Upon a woman s face. E. J. Pratt (1882 1964)
|
||||||
The granite features of this cliff
|
The granite features of this cliff
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
|
||||||
select headline('Erosion It took the sea a thousand years,
|
select headline('Erosion It took the sea a thousand years,
|
||||||
A thousand years to trace
|
A thousand years to trace
|
||||||
The granite features of this cliff
|
The granite features of this cliff
|
||||||
|
@ -2354,7 +2353,6 @@ Upon a woman s face. E. J. Pratt (1882 1964)
|
||||||
The <b>granite</b> features of this cliff
|
The <b>granite</b> features of this cliff
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
|
|
||||||
select headline('Erosion It took the sea a thousand years,
|
select headline('Erosion It took the sea a thousand years,
|
||||||
A thousand years to trace
|
A thousand years to trace
|
||||||
The granite features of this cliff
|
The granite features of this cliff
|
||||||
|
@ -2382,7 +2380,7 @@ ff-bg
|
||||||
document.write(15);
|
document.write(15);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>',
|
</html>',
|
||||||
to_tsquery('sea&foo'), 'HighlightAll=true');
|
to_tsquery('sea&foo'), 'HighlightAll=true');
|
||||||
headline
|
headline
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -168,8 +168,8 @@ SELECT length(to_tsvector('english', '345 qwe@efd.r '' http://www.com/ http://ae
|
||||||
<i <b> wow < jqw <> qwerty'));
|
<i <b> wow < jqw <> qwerty'));
|
||||||
|
|
||||||
|
|
||||||
select to_tsquery('english', 'qwe & sKies ');
|
select to_tsquery('english', 'qwe & sKies ');
|
||||||
select to_tsquery('simple', 'qwe & sKies ');
|
select to_tsquery('simple', 'qwe & sKies ');
|
||||||
select to_tsquery('english', '''the wether'':dc & '' sKies '':BC ');
|
select to_tsquery('english', '''the wether'':dc & '' sKies '':BC ');
|
||||||
select to_tsquery('english', 'asd&(and|fghj)');
|
select to_tsquery('english', 'asd&(and|fghj)');
|
||||||
select to_tsquery('english', '(asd&and)|fghj');
|
select to_tsquery('english', '(asd&and)|fghj');
|
||||||
|
@ -288,7 +288,7 @@ An hour of storm to place
|
||||||
The sculpture of these granite seams,
|
The sculpture of these granite seams,
|
||||||
Upon a woman s face. E. J. Pratt (1882 1964)
|
Upon a woman s face. E. J. Pratt (1882 1964)
|
||||||
', to_tsquery('sea&thousand&years'));
|
', to_tsquery('sea&thousand&years'));
|
||||||
|
|
||||||
select headline('Erosion It took the sea a thousand years,
|
select headline('Erosion It took the sea a thousand years,
|
||||||
A thousand years to trace
|
A thousand years to trace
|
||||||
The granite features of this cliff
|
The granite features of this cliff
|
||||||
|
@ -298,7 +298,7 @@ An hour of storm to place
|
||||||
The sculpture of these granite seams,
|
The sculpture of these granite seams,
|
||||||
Upon a woman s face. E. J. Pratt (1882 1964)
|
Upon a woman s face. E. J. Pratt (1882 1964)
|
||||||
', to_tsquery('granite&sea'));
|
', to_tsquery('granite&sea'));
|
||||||
|
|
||||||
select headline('Erosion It took the sea a thousand years,
|
select headline('Erosion It took the sea a thousand years,
|
||||||
A thousand years to trace
|
A thousand years to trace
|
||||||
The granite features of this cliff
|
The granite features of this cliff
|
||||||
|
@ -321,7 +321,7 @@ ff-bg
|
||||||
document.write(15);
|
document.write(15);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>',
|
</html>',
|
||||||
to_tsquery('sea&foo'), 'HighlightAll=true');
|
to_tsquery('sea&foo'), 'HighlightAll=true');
|
||||||
--check debug
|
--check debug
|
||||||
select * from public.ts_debug('Tsearch module for PostgreSQL 7.3.3');
|
select * from public.ts_debug('Tsearch module for PostgreSQL 7.3.3');
|
||||||
|
|
|
@ -11,7 +11,7 @@ CREATE DOMAIN gtsvector AS pg_catalog.gtsvector;
|
||||||
CREATE DOMAIN gtsq AS pg_catalog.text;
|
CREATE DOMAIN gtsq AS pg_catalog.text;
|
||||||
|
|
||||||
--dict interface
|
--dict interface
|
||||||
CREATE FUNCTION lexize(oid, text)
|
CREATE FUNCTION lexize(oid, text)
|
||||||
RETURNS _text
|
RETURNS _text
|
||||||
as 'ts_lexize'
|
as 'ts_lexize'
|
||||||
LANGUAGE INTERNAL
|
LANGUAGE INTERNAL
|
||||||
|
@ -44,7 +44,7 @@ CREATE FUNCTION set_curdict(text)
|
||||||
--built-in dictionaries
|
--built-in dictionaries
|
||||||
CREATE FUNCTION dex_init(internal)
|
CREATE FUNCTION dex_init(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
as 'MODULE_PATHNAME', 'tsa_dex_init'
|
as 'MODULE_PATHNAME', 'tsa_dex_init'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
||||||
CREATE FUNCTION dex_lexize(internal,internal,int4)
|
CREATE FUNCTION dex_lexize(internal,internal,int4)
|
||||||
|
@ -66,7 +66,7 @@ CREATE FUNCTION snb_lexize(internal,internal,int4)
|
||||||
|
|
||||||
CREATE FUNCTION snb_ru_init_koi8(internal)
|
CREATE FUNCTION snb_ru_init_koi8(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
as 'MODULE_PATHNAME', 'tsa_snb_ru_init_koi8'
|
as 'MODULE_PATHNAME', 'tsa_snb_ru_init_koi8'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
||||||
CREATE FUNCTION snb_ru_init_utf8(internal)
|
CREATE FUNCTION snb_ru_init_utf8(internal)
|
||||||
|
@ -81,7 +81,7 @@ CREATE FUNCTION snb_ru_init(internal)
|
||||||
|
|
||||||
CREATE FUNCTION spell_init(internal)
|
CREATE FUNCTION spell_init(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
as 'MODULE_PATHNAME', 'tsa_spell_init'
|
as 'MODULE_PATHNAME', 'tsa_spell_init'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
||||||
CREATE FUNCTION spell_lexize(internal,internal,int4)
|
CREATE FUNCTION spell_lexize(internal,internal,int4)
|
||||||
|
@ -92,7 +92,7 @@ CREATE FUNCTION spell_lexize(internal,internal,int4)
|
||||||
|
|
||||||
CREATE FUNCTION syn_init(internal)
|
CREATE FUNCTION syn_init(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
as 'MODULE_PATHNAME', 'tsa_syn_init'
|
as 'MODULE_PATHNAME', 'tsa_syn_init'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
||||||
CREATE FUNCTION syn_lexize(internal,internal,int4)
|
CREATE FUNCTION syn_lexize(internal,internal,int4)
|
||||||
|
@ -113,8 +113,8 @@ CREATE FUNCTION thesaurus_lexize(internal,internal,int4,internal)
|
||||||
RETURNS NULL ON NULL INPUT;
|
RETURNS NULL ON NULL INPUT;
|
||||||
|
|
||||||
--sql-level interface
|
--sql-level interface
|
||||||
CREATE TYPE tokentype
|
CREATE TYPE tokentype
|
||||||
as (tokid int4, alias text, descr text);
|
as (tokid int4, alias text, descr text);
|
||||||
|
|
||||||
CREATE FUNCTION token_type(int4)
|
CREATE FUNCTION token_type(int4)
|
||||||
RETURNS setof tokentype
|
RETURNS setof tokentype
|
||||||
|
@ -149,7 +149,7 @@ CREATE FUNCTION set_curprs(text)
|
||||||
LANGUAGE C
|
LANGUAGE C
|
||||||
RETURNS NULL ON NULL INPUT;
|
RETURNS NULL ON NULL INPUT;
|
||||||
|
|
||||||
CREATE TYPE tokenout
|
CREATE TYPE tokenout
|
||||||
as (tokid int4, token text);
|
as (tokid int4, token text);
|
||||||
|
|
||||||
CREATE FUNCTION parse(oid,text)
|
CREATE FUNCTION parse(oid,text)
|
||||||
|
@ -157,19 +157,19 @@ CREATE FUNCTION parse(oid,text)
|
||||||
as 'ts_parse_byid'
|
as 'ts_parse_byid'
|
||||||
LANGUAGE INTERNAL
|
LANGUAGE INTERNAL
|
||||||
RETURNS NULL ON NULL INPUT;
|
RETURNS NULL ON NULL INPUT;
|
||||||
|
|
||||||
CREATE FUNCTION parse(text,text)
|
CREATE FUNCTION parse(text,text)
|
||||||
RETURNS setof tokenout
|
RETURNS setof tokenout
|
||||||
as 'ts_parse_byname'
|
as 'ts_parse_byname'
|
||||||
LANGUAGE INTERNAL
|
LANGUAGE INTERNAL
|
||||||
RETURNS NULL ON NULL INPUT;
|
RETURNS NULL ON NULL INPUT;
|
||||||
|
|
||||||
CREATE FUNCTION parse(text)
|
CREATE FUNCTION parse(text)
|
||||||
RETURNS setof tokenout
|
RETURNS setof tokenout
|
||||||
as 'MODULE_PATHNAME', 'tsa_parse_current'
|
as 'MODULE_PATHNAME', 'tsa_parse_current'
|
||||||
LANGUAGE C
|
LANGUAGE C
|
||||||
RETURNS NULL ON NULL INPUT;
|
RETURNS NULL ON NULL INPUT;
|
||||||
|
|
||||||
--default parser
|
--default parser
|
||||||
CREATE FUNCTION prsd_start(internal,int4)
|
CREATE FUNCTION prsd_start(internal,int4)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
|
@ -399,7 +399,7 @@ AS
|
||||||
STORAGE gtsvector;
|
STORAGE gtsvector;
|
||||||
|
|
||||||
--stat info
|
--stat info
|
||||||
CREATE TYPE statinfo
|
CREATE TYPE statinfo
|
||||||
as (word text, ndoc int4, nentry int4);
|
as (word text, ndoc int4, nentry int4);
|
||||||
|
|
||||||
CREATE FUNCTION stat(text)
|
CREATE FUNCTION stat(text)
|
||||||
|
@ -560,7 +560,7 @@ AS
|
||||||
CREATE OPERATOR CLASS tsvector_ops
|
CREATE OPERATOR CLASS tsvector_ops
|
||||||
FOR TYPE tsvector USING btree AS
|
FOR TYPE tsvector USING btree AS
|
||||||
OPERATOR 1 < ,
|
OPERATOR 1 < ,
|
||||||
OPERATOR 2 <= ,
|
OPERATOR 2 <= ,
|
||||||
OPERATOR 3 = ,
|
OPERATOR 3 = ,
|
||||||
OPERATOR 4 >= ,
|
OPERATOR 4 >= ,
|
||||||
OPERATOR 5 > ,
|
OPERATOR 5 > ,
|
||||||
|
|
|
@ -9,7 +9,7 @@ DATA_TSEARCH = unaccent.rules
|
||||||
REGRESS = unaccent
|
REGRESS = unaccent
|
||||||
|
|
||||||
# Adjust REGRESS_OPTS because we need a UTF8 database
|
# Adjust REGRESS_OPTS because we need a UTF8 database
|
||||||
REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB) --multibyte=UTF8 --no-locale
|
REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB) --multibyte=UTF8 --no-locale
|
||||||
|
|
||||||
ifdef USE_PGXS
|
ifdef USE_PGXS
|
||||||
PG_CONFIG = pg_config
|
PG_CONFIG = pg_config
|
||||||
|
|
|
@ -18,7 +18,7 @@ select query_to_xml('select 1 as x',true,false,'');
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select xslt_process( query_to_xml('select x from generate_series(1,5) as
|
select xslt_process( query_to_xml('select x from generate_series(1,5) as
|
||||||
x',true,false,'')::text,
|
x',true,false,'')::text,
|
||||||
$$<xsl:stylesheet version="1.0"
|
$$<xsl:stylesheet version="1.0"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
|
@ -18,7 +18,7 @@ select query_to_xml('select 1 as x',true,false,'');
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
select xslt_process( query_to_xml('select x from generate_series(1,5) as
|
select xslt_process( query_to_xml('select x from generate_series(1,5) as
|
||||||
x',true,false,'')::text,
|
x',true,false,'')::text,
|
||||||
$$<xsl:stylesheet version="1.0"
|
$$<xsl:stylesheet version="1.0"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
|
@ -10,7 +10,7 @@ RESET client_min_messages;
|
||||||
|
|
||||||
select query_to_xml('select 1 as x',true,false,'');
|
select query_to_xml('select 1 as x',true,false,'');
|
||||||
|
|
||||||
select xslt_process( query_to_xml('select x from generate_series(1,5) as
|
select xslt_process( query_to_xml('select x from generate_series(1,5) as
|
||||||
x',true,false,'')::text,
|
x',true,false,'')::text,
|
||||||
$$<xsl:stylesheet version="1.0"
|
$$<xsl:stylesheet version="1.0"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
|
@ -40,7 +40,7 @@ Please enter a FULL description of your problem:
|
||||||
|
|
||||||
|
|
||||||
Please describe a way to repeat the problem. Please try to provide a
|
Please describe a way to repeat the problem. Please try to provide a
|
||||||
concise reproducible example, if at all possible:
|
concise reproducible example, if at all possible:
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ CATALOG = -c $(DOCBOOKSTYLE)/catalog
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable some extra warnings
|
# Enable some extra warnings
|
||||||
# -wfully-tagged needed to throw a warning on missing tags
|
# -wfully-tagged needed to throw a warning on missing tags
|
||||||
# for older tool chains, 2007-08-31
|
# for older tool chains, 2007-08-31
|
||||||
# Note: try "make SPFLAGS=-wxml" to catch a lot of other dubious constructs,
|
# Note: try "make SPFLAGS=-wxml" to catch a lot of other dubious constructs,
|
||||||
# in particular < and & that haven't been made into entities. It's far too
|
# in particular < and & that haven't been made into entities. It's far too
|
||||||
|
|
|
@ -112,8 +112,8 @@ LOAD 'auto_explain';
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<varname>auto_explain.log_buffers</varname> causes <command>EXPLAIN
|
<varname>auto_explain.log_buffers</varname> causes <command>EXPLAIN
|
||||||
(ANALYZE, BUFFERS)</> output, rather than just <command>EXPLAIN</>
|
(ANALYZE, BUFFERS)</> output, rather than just <command>EXPLAIN</>
|
||||||
output, to be printed when an execution plan is logged. This parameter is
|
output, to be printed when an execution plan is logged. This parameter is
|
||||||
off by default. Only superusers can change this setting. This
|
off by default. Only superusers can change this setting. This
|
||||||
parameter has no effect unless <varname>auto_explain.log_analyze</>
|
parameter has no effect unless <varname>auto_explain.log_analyze</>
|
||||||
parameter is set.
|
parameter is set.
|
||||||
|
|
|
@ -257,7 +257,7 @@ ssimkovi@ag.or.at
|
||||||
<bibliodiv>
|
<bibliodiv>
|
||||||
<title>Proceedings and Articles</title>
|
<title>Proceedings and Articles</title>
|
||||||
<para>This section is for articles and newsletters.</para>
|
<para>This section is for articles and newsletters.</para>
|
||||||
|
|
||||||
<biblioentry id="OLSON93">
|
<biblioentry id="OLSON93">
|
||||||
<title>Partial indexing in POSTGRES: research project</title>
|
<title>Partial indexing in POSTGRES: research project</title>
|
||||||
<titleabbrev>Olson, 1993</titleabbrev>
|
<titleabbrev>Olson, 1993</titleabbrev>
|
||||||
|
@ -328,7 +328,7 @@ ssimkovi@ag.or.at
|
||||||
<biblioset relation="article">
|
<biblioset relation="article">
|
||||||
<title>Generalized Partial Indexes
|
<title>Generalized Partial Indexes
|
||||||
<ulink url="http://citeseer.ist.psu.edu/seshadri95generalized.html">(cached version)
|
<ulink url="http://citeseer.ist.psu.edu/seshadri95generalized.html">(cached version)
|
||||||
<!--
|
<!--
|
||||||
Original URL: http://citeseer.ist.psu.edu/seshadri95generalized.html
|
Original URL: http://citeseer.ist.psu.edu/seshadri95generalized.html
|
||||||
-->
|
-->
|
||||||
</ulink>
|
</ulink>
|
||||||
|
|
|
@ -71,7 +71,7 @@ initdb --locale=sv_SE
|
||||||
locale then the specifications can take the form
|
locale then the specifications can take the form
|
||||||
<replaceable>language_territory.codeset</>. For example,
|
<replaceable>language_territory.codeset</>. For example,
|
||||||
<literal>fr_BE.UTF-8</> represents the French language (fr) as
|
<literal>fr_BE.UTF-8</> represents the French language (fr) as
|
||||||
spoken in Belgium (BE), with a <acronym>UTF-8</> character set
|
spoken in Belgium (BE), with a <acronym>UTF-8</> character set
|
||||||
encoding.
|
encoding.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
|
@ -718,7 +718,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Sets the location of the Kerberos server key file. See
|
Sets the location of the Kerberos server key file. See
|
||||||
<xref linkend="kerberos-auth"> or <xref linkend="gssapi-auth">
|
<xref linkend="kerberos-auth"> or <xref linkend="gssapi-auth">
|
||||||
for details. This parameter can only be set in the
|
for details. This parameter can only be set in the
|
||||||
<filename>postgresql.conf</> file or on the server command line.
|
<filename>postgresql.conf</> file or on the server command line.
|
||||||
</para>
|
</para>
|
||||||
|
@ -748,7 +748,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
<para>
|
<para>
|
||||||
Sets whether Kerberos and GSSAPI user names should be treated
|
Sets whether Kerberos and GSSAPI user names should be treated
|
||||||
case-insensitively.
|
case-insensitively.
|
||||||
The default is <literal>off</> (case sensitive). This parameter can only be
|
The default is <literal>off</> (case sensitive). This parameter can only be
|
||||||
set in the <filename>postgresql.conf</> file or on the server command line.
|
set in the <filename>postgresql.conf</> file or on the server command line.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -1044,7 +1044,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-shared-preload-libraries" xreflabel="shared_preload_libraries">
|
<varlistentry id="guc-shared-preload-libraries" xreflabel="shared_preload_libraries">
|
||||||
<term><varname>shared_preload_libraries</varname> (<type>string</type>)</term>
|
<term><varname>shared_preload_libraries</varname> (<type>string</type>)</term>
|
||||||
<indexterm>
|
<indexterm>
|
||||||
|
@ -1076,7 +1076,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
when the library is first used. However, the time to start each new
|
when the library is first used. However, the time to start each new
|
||||||
server process might increase slightly, even if that process never
|
server process might increase slightly, even if that process never
|
||||||
uses the library. So this parameter is recommended only for
|
uses the library. So this parameter is recommended only for
|
||||||
libraries that will be used in most sessions.
|
libraries that will be used in most sessions.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
|
@ -1084,7 +1084,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
On Windows hosts, preloading a library at server start will not reduce
|
On Windows hosts, preloading a library at server start will not reduce
|
||||||
the time required to start each new server process; each server process
|
the time required to start each new server process; each server process
|
||||||
will re-load all preload libraries. However, <varname>shared_preload_libraries
|
will re-load all preload libraries. However, <varname>shared_preload_libraries
|
||||||
</varname> is still useful on Windows hosts because some shared libraries may
|
</varname> is still useful on Windows hosts because some shared libraries may
|
||||||
need to perform certain operations that only take place at postmaster start
|
need to perform certain operations that only take place at postmaster start
|
||||||
(for example, a shared library may need to reserve lightweight locks
|
(for example, a shared library may need to reserve lightweight locks
|
||||||
or shared memory and you can't do that after the postmaster has started).
|
or shared memory and you can't do that after the postmaster has started).
|
||||||
|
@ -1097,8 +1097,8 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Every PostgreSQL-supported library has a <quote>magic
|
Every PostgreSQL-supported library has a <quote>magic
|
||||||
block</> that is checked to guarantee compatibility.
|
block</> that is checked to guarantee compatibility.
|
||||||
For this reason, non-PostgreSQL libraries cannot be
|
For this reason, non-PostgreSQL libraries cannot be
|
||||||
loaded in this way.
|
loaded in this way.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -1487,7 +1487,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
<para>
|
<para>
|
||||||
<varname>fsync</varname> can only be set in the <filename>postgresql.conf</>
|
<varname>fsync</varname> can only be set in the <filename>postgresql.conf</>
|
||||||
file or on the server command line.
|
file or on the server command line.
|
||||||
If you turn this parameter off, also consider turning off
|
If you turn this parameter off, also consider turning off
|
||||||
<xref linkend="guc-full-page-writes">.
|
<xref linkend="guc-full-page-writes">.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -1528,7 +1528,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-wal-sync-method" xreflabel="wal_sync_method">
|
<varlistentry id="guc-wal-sync-method" xreflabel="wal_sync_method">
|
||||||
<term><varname>wal_sync_method</varname> (<type>enum</type>)</term>
|
<term><varname>wal_sync_method</varname> (<type>enum</type>)</term>
|
||||||
<indexterm>
|
<indexterm>
|
||||||
|
@ -1584,7 +1584,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-full-page-writes" xreflabel="full_page_writes">
|
<varlistentry id="guc-full-page-writes" xreflabel="full_page_writes">
|
||||||
<indexterm>
|
<indexterm>
|
||||||
<primary><varname>full_page_writes</> configuration parameter</primary>
|
<primary><varname>full_page_writes</> configuration parameter</primary>
|
||||||
|
@ -1848,7 +1848,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-archive-timeout" xreflabel="archive_timeout">
|
<varlistentry id="guc-archive-timeout" xreflabel="archive_timeout">
|
||||||
<term><varname>archive_timeout</varname> (<type>integer</type>)</term>
|
<term><varname>archive_timeout</varname> (<type>integer</type>)</term>
|
||||||
<indexterm>
|
<indexterm>
|
||||||
|
@ -2257,7 +2257,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 id="runtime-config-query-constants">
|
<sect2 id="runtime-config-query-constants">
|
||||||
|
@ -2368,7 +2368,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-cpu-operator-cost" xreflabel="cpu_operator_cost">
|
<varlistentry id="guc-cpu-operator-cost" xreflabel="cpu_operator_cost">
|
||||||
<term><varname>cpu_operator_cost</varname> (<type>floating point</type>)</term>
|
<term><varname>cpu_operator_cost</varname> (<type>floating point</type>)</term>
|
||||||
<indexterm>
|
<indexterm>
|
||||||
|
@ -2382,7 +2382,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-effective-cache-size" xreflabel="effective_cache_size">
|
<varlistentry id="guc-effective-cache-size" xreflabel="effective_cache_size">
|
||||||
<term><varname>effective_cache_size</varname> (<type>integer</type>)</term>
|
<term><varname>effective_cache_size</varname> (<type>integer</type>)</term>
|
||||||
<indexterm>
|
<indexterm>
|
||||||
|
@ -2745,10 +2745,10 @@ SELECT * FROM parent WHERE key = 2400;
|
||||||
<productname>PostgreSQL</productname> supports several methods
|
<productname>PostgreSQL</productname> supports several methods
|
||||||
for logging server messages, including
|
for logging server messages, including
|
||||||
<systemitem>stderr</systemitem>, <systemitem>csvlog</systemitem> and
|
<systemitem>stderr</systemitem>, <systemitem>csvlog</systemitem> and
|
||||||
<systemitem>syslog</systemitem>. On Windows,
|
<systemitem>syslog</systemitem>. On Windows,
|
||||||
<systemitem>eventlog</systemitem> is also supported. Set this
|
<systemitem>eventlog</systemitem> is also supported. Set this
|
||||||
parameter to a list of desired log destinations separated by
|
parameter to a list of desired log destinations separated by
|
||||||
commas. The default is to log to <systemitem>stderr</systemitem>
|
commas. The default is to log to <systemitem>stderr</systemitem>
|
||||||
only.
|
only.
|
||||||
This parameter can only be set in the <filename>postgresql.conf</>
|
This parameter can only be set in the <filename>postgresql.conf</>
|
||||||
file or on the server command line.
|
file or on the server command line.
|
||||||
|
@ -2759,7 +2759,7 @@ SELECT * FROM parent WHERE key = 2400;
|
||||||
value</> (<acronym>CSV</>) format, which is convenient for
|
value</> (<acronym>CSV</>) format, which is convenient for
|
||||||
loading logs into programs.
|
loading logs into programs.
|
||||||
See <xref linkend="runtime-config-logging-csvlog"> for details.
|
See <xref linkend="runtime-config-logging-csvlog"> for details.
|
||||||
<varname>logging_collector</varname> must be enabled to generate
|
<varname>logging_collector</varname> must be enabled to generate
|
||||||
CSV-format log output.
|
CSV-format log output.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -2822,7 +2822,7 @@ local0.* /var/log/postgresql
|
||||||
</indexterm>
|
</indexterm>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
When <varname>logging_collector</> is enabled,
|
When <varname>logging_collector</> is enabled,
|
||||||
this parameter determines the directory in which log files will be created.
|
this parameter determines the directory in which log files will be created.
|
||||||
It can be specified as an absolute path, or relative to the
|
It can be specified as an absolute path, or relative to the
|
||||||
cluster data directory.
|
cluster data directory.
|
||||||
|
@ -2861,7 +2861,7 @@ local0.* /var/log/postgresql
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If CSV-format output is enabled in <varname>log_destination</>,
|
If CSV-format output is enabled in <varname>log_destination</>,
|
||||||
<literal>.csv</> will be appended to the timestamped
|
<literal>.csv</> will be appended to the timestamped
|
||||||
log file name to create the file name for CSV-format output.
|
log file name to create the file name for CSV-format output.
|
||||||
(If <varname>log_filename</> ends in <literal>.log</>, the suffix is
|
(If <varname>log_filename</> ends in <literal>.log</>, the suffix is
|
||||||
replaced instead.)
|
replaced instead.)
|
||||||
|
@ -2966,18 +2966,18 @@ local0.* /var/log/postgresql
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Example: To keep 7 days of logs, one log file per day named
|
Example: To keep 7 days of logs, one log file per day named
|
||||||
<literal>server_log.Mon</literal>, <literal>server_log.Tue</literal>,
|
<literal>server_log.Mon</literal>, <literal>server_log.Tue</literal>,
|
||||||
etc, and automatically overwrite last week's log with this week's log,
|
etc, and automatically overwrite last week's log with this week's log,
|
||||||
set <varname>log_filename</varname> to <literal>server_log.%a</literal>,
|
set <varname>log_filename</varname> to <literal>server_log.%a</literal>,
|
||||||
<varname>log_truncate_on_rotation</varname> to <literal>on</literal>, and
|
<varname>log_truncate_on_rotation</varname> to <literal>on</literal>, and
|
||||||
<varname>log_rotation_age</varname> to <literal>1440</literal>.
|
<varname>log_rotation_age</varname> to <literal>1440</literal>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Example: To keep 24 hours of logs, one log file per hour, but
|
Example: To keep 24 hours of logs, one log file per hour, but
|
||||||
also rotate sooner if the log file size exceeds 1GB, set
|
also rotate sooner if the log file size exceeds 1GB, set
|
||||||
<varname>log_filename</varname> to <literal>server_log.%H%M</literal>,
|
<varname>log_filename</varname> to <literal>server_log.%H%M</literal>,
|
||||||
<varname>log_truncate_on_rotation</varname> to <literal>on</literal>,
|
<varname>log_truncate_on_rotation</varname> to <literal>on</literal>,
|
||||||
<varname>log_rotation_age</varname> to <literal>60</literal>, and
|
<varname>log_rotation_age</varname> to <literal>60</literal>, and
|
||||||
<varname>log_rotation_size</varname> to <literal>1000000</literal>.
|
<varname>log_rotation_size</varname> to <literal>1000000</literal>.
|
||||||
Including <literal>%M</> in <varname>log_filename</varname> allows
|
Including <literal>%M</> in <varname>log_filename</varname> allows
|
||||||
any size-driven rotations that might occur to select a file name
|
any size-driven rotations that might occur to select a file name
|
||||||
|
@ -3007,7 +3007,7 @@ local0.* /var/log/postgresql
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-syslog-ident" xreflabel="syslog_ident">
|
<varlistentry id="guc-syslog-ident" xreflabel="syslog_ident">
|
||||||
<term><varname>syslog_ident</varname> (<type>string</type>)</term>
|
<term><varname>syslog_ident</varname> (<type>string</type>)</term>
|
||||||
<indexterm>
|
<indexterm>
|
||||||
|
@ -3132,7 +3132,7 @@ local0.* /var/log/postgresql
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-log-min-duration-statement" xreflabel="log_min_duration_statement">
|
<varlistentry id="guc-log-min-duration-statement" xreflabel="log_min_duration_statement">
|
||||||
<term><varname>log_min_duration_statement</varname> (<type>integer</type>)</term>
|
<term><varname>log_min_duration_statement</varname> (<type>integer</type>)</term>
|
||||||
<indexterm>
|
<indexterm>
|
||||||
|
@ -3163,7 +3163,7 @@ local0.* /var/log/postgresql
|
||||||
the text of statements that are logged because of
|
the text of statements that are logged because of
|
||||||
<varname>log_statement</> will not be repeated in the
|
<varname>log_statement</> will not be repeated in the
|
||||||
duration log message.
|
duration log message.
|
||||||
If you are not using <application>syslog</>, it is recommended
|
If you are not using <application>syslog</>, it is recommended
|
||||||
that you log the PID or session ID using
|
that you log the PID or session ID using
|
||||||
<xref linkend="guc-log-line-prefix">
|
<xref linkend="guc-log-line-prefix">
|
||||||
so that you can link the statement message to the later
|
so that you can link the statement message to the later
|
||||||
|
@ -3365,8 +3365,8 @@ local0.* /var/log/postgresql
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
Some client programs, like <application>psql</>, attempt
|
Some client programs, like <application>psql</>, attempt
|
||||||
to connect twice while determining if a password is required, so
|
to connect twice while determining if a password is required, so
|
||||||
duplicate <quote>connection received</> messages do not
|
duplicate <quote>connection received</> messages do not
|
||||||
necessarily indicate a problem.
|
necessarily indicate a problem.
|
||||||
</para>
|
</para>
|
||||||
|
@ -3462,7 +3462,7 @@ local0.* /var/log/postgresql
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-log-line-prefix" xreflabel="log_line_prefix">
|
<varlistentry id="guc-log-line-prefix" xreflabel="log_line_prefix">
|
||||||
<term><varname>log_line_prefix</varname> (<type>string</type>)</term>
|
<term><varname>log_line_prefix</varname> (<type>string</type>)</term>
|
||||||
<indexterm>
|
<indexterm>
|
||||||
|
@ -3607,7 +3607,7 @@ FROM pg_stat_activity;
|
||||||
|
|
||||||
<tip>
|
<tip>
|
||||||
<para>
|
<para>
|
||||||
<application>Syslog</> produces its own
|
<application>Syslog</> produces its own
|
||||||
time stamp and process ID information, so you probably do not want to
|
time stamp and process ID information, so you probably do not want to
|
||||||
include those escapes if you are logging to <application>syslog</>.
|
include those escapes if you are logging to <application>syslog</>.
|
||||||
</para>
|
</para>
|
||||||
|
@ -3808,9 +3808,9 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Set <varname>log_rotation_size</varname> to 0 to disable
|
Set <varname>log_rotation_size</varname> to 0 to disable
|
||||||
size-based log rotation, as it makes the log file name difficult
|
size-based log rotation, as it makes the log file name difficult
|
||||||
to predict.
|
to predict.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
@ -5000,7 +5000,7 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Every PostgreSQL-supported library has a <quote>magic
|
Every PostgreSQL-supported library has a <quote>magic
|
||||||
block</> that is checked to guarantee compatibility.
|
block</> that is checked to guarantee compatibility.
|
||||||
For this reason, non-PostgreSQL libraries cannot be
|
For this reason, non-PostgreSQL libraries cannot be
|
||||||
loaded in this way.
|
loaded in this way.
|
||||||
</para>
|
</para>
|
||||||
|
|
|
@ -15,7 +15,7 @@ and the mailing lists themselves.
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Refer to the introduction in this manual or to the
|
Refer to the introduction in this manual or to the
|
||||||
<productname>PostgreSQL</productname>
|
<productname>PostgreSQL</productname>
|
||||||
<ulink url="http://www.postgresql.org">web page</ulink>
|
<ulink url="http://www.postgresql.org">web page</ulink>
|
||||||
for subscription information to the no-cost mailing lists.
|
for subscription information to the no-cost mailing lists.
|
||||||
</para>
|
</para>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue