Procédure pour activer module pgcrypto
This commit is contained in:
parent
b454ea4f74
commit
875b412331
|
@ -1295,3 +1295,27 @@ RemainAfterExit=on
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
### Activer module `pgcrypto`
|
||||||
|
|
||||||
|
Dans le *shell* `psql` :
|
||||||
|
|
||||||
|
~~~
|
||||||
|
hostname=# drop extension pgcrypto;
|
||||||
|
hostname=# create extension pgcrypto;
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Pour vérifier :
|
||||||
|
|
||||||
|
~~~
|
||||||
|
hostname=# select pg_get_functiondef(to_regproc('gen_random_uuid'));
|
||||||
|
pg_get_functiondef
|
||||||
|
-----------------------------------------------------------
|
||||||
|
CREATE OR REPLACE FUNCTION public.gen_random_uuid() +
|
||||||
|
RETURNS uuid +
|
||||||
|
LANGUAGE c +
|
||||||
|
PARALLEL SAFE +
|
||||||
|
AS '$libdir/pgcrypto', $function$pg_random_uuid$function$+
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
~~~
|
Loading…
Reference in a new issue