aboutsummaryrefslogtreecommitdiff
path: root/res/sql/functions/pg_gen_uuid.sql
diff options
context:
space:
mode:
Diffstat (limited to 'res/sql/functions/pg_gen_uuid.sql')
-rw-r--r--res/sql/functions/pg_gen_uuid.sql9
1 files changed, 9 insertions, 0 deletions
diff --git a/res/sql/functions/pg_gen_uuid.sql b/res/sql/functions/pg_gen_uuid.sql
new file mode 100644
index 0000000..c592385
--- /dev/null
+++ b/res/sql/functions/pg_gen_uuid.sql
@@ -0,0 +1,9 @@
1CREATE OR REPLACE FUNCTION gen_uuid()
2 RETURNS VARCHAR
3AS '
4BEGIN
5
6 RETURN upper(cast(uuid_generate_v4() AS VARCHAR));
7
8END;
9' LANGUAGE plpgsql;