mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-07 21:05:18 +02:00
pgsql schema: Add function definition for unix_timestamp
This does not seem to require any special privileges since we're using SQL as language and no unusual data types. If this proves false though, feel free to fix this. refs #8826
This commit is contained in:
parent
e936c76ca9
commit
80e4e419e2
@ -1,5 +1,9 @@
|
||||
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||
|
||||
CREATE OR REPLACE FUNCTION unix_timestamp(timestamp with time zone) RETURNS bigint AS '
|
||||
SELECT EXTRACT(EPOCH FROM $1)::bigint AS result
|
||||
' LANGUAGE sql;
|
||||
|
||||
CREATE TABLE "icingaweb_group" (
|
||||
"id" serial,
|
||||
"name" character varying(64) NOT NULL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user