diff options
author | Thomas Markwalder <tmark@isc.org> | 2022-02-21 18:45:11 +0100 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2022-02-21 18:45:11 +0100 |
commit | 22c8ddf7aa35922b9551421f43a787bb62dcf539 (patch) | |
tree | 745095ea3a7ef8e830c19f68c273093bb1699aff | |
parent | [#2320] release changes (diff) | |
download | kea-22c8ddf7aa35922b9551421f43a787bb62dcf539.tar.xz kea-22c8ddf7aa35922b9551421f43a787bb62dcf539.zip |
[#2323] PostgreSQL CB function needs cast to BIGINTKea-2.1.3
src/share/database/scripts/pgsql/dhcpdb_create.pgsql
src/share/database/scripts/pgsql/upgrade_008_to_009.sh.in
Add cast to BIGINT to gmt_epoch(). Postgresql 9x is unhappy without it.
-rw-r--r-- | src/share/database/scripts/pgsql/dhcpdb_create.pgsql | 2 | ||||
-rw-r--r-- | src/share/database/scripts/pgsql/upgrade_008_to_009.sh.in | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql index ecf417d587..40f1d3dc7e 100644 --- a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql +++ b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql @@ -4502,7 +4502,7 @@ AS $$ DECLARE gmt_epoch BIGINT; BEGIN - select extract(epoch from input_ts) + extract(timezone from input_ts) into gmt_epoch; + SELECT (extract(epoch from input_ts) + extract(timezone from input_ts))::BIGINT INTO gmt_epoch; RETURN gmt_epoch; EXCEPTION WHEN OTHERS THEN diff --git a/src/share/database/scripts/pgsql/upgrade_008_to_009.sh.in b/src/share/database/scripts/pgsql/upgrade_008_to_009.sh.in index 656f664d5d..b68ebf6bf7 100644 --- a/src/share/database/scripts/pgsql/upgrade_008_to_009.sh.in +++ b/src/share/database/scripts/pgsql/upgrade_008_to_009.sh.in @@ -274,7 +274,7 @@ AS \$\$ DECLARE gmt_epoch BIGINT; BEGIN - select extract(epoch from input_ts) + extract(timezone from input_ts) into gmt_epoch; + SELECT (extract(epoch from input_ts) + extract(timezone from input_ts))::BIGINT INTO gmt_epoch; RETURN gmt_epoch; EXCEPTION WHEN OTHERS THEN |