diff options
Diffstat (limited to 'res/sql/functions/pg_gen_uuid.sql')
-rw-r--r-- | res/sql/functions/pg_gen_uuid.sql | 9 |
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 @@ | |||
1 | CREATE OR REPLACE FUNCTION gen_uuid() | ||
2 | RETURNS VARCHAR | ||
3 | AS ' | ||
4 | BEGIN | ||
5 | |||
6 | RETURN upper(cast(uuid_generate_v4() AS VARCHAR)); | ||
7 | |||
8 | END; | ||
9 | ' LANGUAGE plpgsql; | ||