-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bump extension metadata to 1.4.0
- Loading branch information
Showing
6 changed files
with
32 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"name": "pg_uuidv7", | ||
"abstract": "Create UUIDv7 values in Postgres", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"maintainer": "fboulnois <[email protected]>", | ||
"license": "open_source", | ||
"provides": { | ||
"pg_uuidv7": { | ||
"abstract": "Create UUIDv7 values in Postgres", | ||
"file": "sql/pg_uuidv7--1.3.sql", | ||
"file": "sql/pg_uuidv7--1.4.sql", | ||
"docfile": "README.md", | ||
"version": "1.3.0" | ||
"version": "1.4.0" | ||
} | ||
}, | ||
"resources": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
comment = 'pg_uuidv7: create UUIDv7 values in postgres' | ||
default_version = '1.3' | ||
default_version = '1.4' | ||
module_pathname = '$libdir/pg_uuidv7' | ||
relocatable = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- complain if script is sourced in psql, rather than via CREATE EXTENSION | ||
\echo Use '''CREATE EXTENSION "pg_uuidv7"''' to load this file. \quit | ||
|
||
-- 48 bits for ms since unix epoch (rollover in 10899), 74 bits of randomness | ||
CREATE FUNCTION uuid_generate_v7() | ||
RETURNS uuid | ||
AS 'MODULE_PATHNAME', 'uuid_generate_v7' | ||
VOLATILE STRICT LANGUAGE C PARALLEL SAFE; | ||
|
||
-- extract the timestamp from a v7 uuid | ||
CREATE FUNCTION uuid_v7_to_timestamptz(uuid) | ||
RETURNS timestamptz | ||
AS 'MODULE_PATHNAME', 'uuid_v7_to_timestamptz' | ||
VOLATILE STRICT LANGUAGE C PARALLEL SAFE; | ||
|
||
-- create a v7 uuid from a timestamp | ||
CREATE FUNCTION uuid_timestamptz_to_v7(timestamptz, zero bool = false) | ||
RETURNS uuid | ||
AS 'MODULE_PATHNAME', 'uuid_timestamptz_to_v7' | ||
VOLATILE STRICT LANGUAGE C PARALLEL SAFE; |