mirror of
https://github.com/bitwarden/server
synced 2025-12-31 07:33:43 +00:00
* PostgreSQL initial commit of translation from SQL Server to PostgreSQL * snake_case added. set search path for schema. schema qualified name no longer needed for creation and access of functions. * Table DDL for PostgreSQL
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
DROP FUNCTION IF EXISTS user_read_by_id;
|
||||
|
||||
CREATE OR REPLACE FUNCTION user_read_by_id
|
||||
(
|
||||
id uuid
|
||||
_id uuid
|
||||
)
|
||||
RETURNS SETOF "user"
|
||||
LANGUAGE 'sql'
|
||||
AS $BODY$
|
||||
LANGUAGE 'plpgsql'
|
||||
AS
|
||||
$BODY$
|
||||
BEGIN
|
||||
RETURN QUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
"user"
|
||||
WHERE
|
||||
"id" = id;
|
||||
"id" = _id;
|
||||
END
|
||||
$BODY$;
|
||||
|
||||
Reference in New Issue
Block a user