postgresql-extensions

How to make an extension not relocatable?

混江龙づ霸主 提交于 2020-06-06 08:30:32
问题 I have an extension: https://github.com/CraigTyle/Mathexp My task is to make the extension not relocatable: it should be possible to install the extension in any schema, but it should be impossible to change that schema. I was told that this is how to do it: Do not use operators and use the @extschema@ prefix for locally defined types and objects. well don't declare relocatable extension. What exactly do I have to do? 回答1: First, you have to change relocatable to false in the extension's

How to install pgxn with correct PostgreSQL version?

若如初见. 提交于 2020-03-25 22:01:17
问题 On sudo -H pgxn install semver , ERROR about wrong PostgreSQL version (it is v10 not v12), INFO: best version: semver 0.20.3 INFO: saving /tmp/tmpba6hta5a/semver-0.20.3.zip INFO: unpacking: /tmp/tmpba6hta5a/semver-0.20.3.zip INFO: building extension gcc -Wall -Wmissing-prototypes -Wpointer-arith... src/semver.c: In function ‘tail_cmp’: src/semver.c:440:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] char *dot = "."; ^ gcc -Wall -Wmissing-prototypes -...

How to install pgxn with correct PostgreSQL version?

久未见 提交于 2020-03-25 22:00:09
问题 On sudo -H pgxn install semver , ERROR about wrong PostgreSQL version (it is v10 not v12), INFO: best version: semver 0.20.3 INFO: saving /tmp/tmpba6hta5a/semver-0.20.3.zip INFO: unpacking: /tmp/tmpba6hta5a/semver-0.20.3.zip INFO: building extension gcc -Wall -Wmissing-prototypes -Wpointer-arith... src/semver.c: In function ‘tail_cmp’: src/semver.c:440:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] char *dot = "."; ^ gcc -Wall -Wmissing-prototypes -...

Can't install extension on Postgresql

谁都会走 提交于 2020-03-18 10:00:40
问题 I try to install semver on my Postgresql 12. I installed postgis successfully and used following command to install pg-semver (semver extension) on my Centos 7 server: yum install pg-semver Then i ran CREATE EXTENSION semver; I got following error: couldn't open extension control file /usr/pgsql-12/share/extension/semver.control : No such file or directory I copied all files from "/usr/share/pgsql/extension/" to "/usr/pgsql-12/share/extension". Now I'm getting following error: ERROR: ERROR:

Using psql how do I list extensions installed in a database?

ε祈祈猫儿з 提交于 2019-11-28 15:45:06
How do I list all extensions that are already installed in a database or schema from psql? See also Finding a list of available extensions that PostgreSQL ships with In psql that would be \dx See the manual for details: http://www.postgresql.org/docs/current/static/app-psql.html Doing it in plain SQL it would be a select on pg_extension : SELECT * FROM pg_extension http://www.postgresql.org/docs/current/static/catalog-pg-extension.html Additionally if you want to know which extensions are available on your server: SELECT * FROM pg_available_extensions This SQL query gives output similar to \dx

Best way to install hstore on multiple schemas in a Postgres database?

孤者浪人 提交于 2019-11-28 01:52:23
I'm working on a project that needs to use hstore on multiple schemas. The 'public' schema, where the hstore extension was being installed isn't available everywhere, because my scope doesn't lookup at 'public'. On some tryouts, I've created the extension on a schema called 'hstore' and used the schema on every available scope (search path) used. Based on this, I've some questions: Is it ok to create a schema just for the extension? Or is it better to create the extension on every single schema (like, customer_1 , customer_2 , and so on...)? Does the creation of the extension in a separate

Using psql how do I list extensions installed in a database?

主宰稳场 提交于 2019-11-27 09:20:11
问题 How do I list all extensions that are already installed in a database or schema from psql? See also Finding a list of available extensions that PostgreSQL ships with 回答1: In psql that would be \dx See the manual for details: http://www.postgresql.org/docs/current/static/app-psql.html Doing it in plain SQL it would be a select on pg_extension : SELECT * FROM pg_extension http://www.postgresql.org/docs/current/static/catalog-pg-extension.html 回答2: Additionally if you want to know which

Best way to install hstore on multiple schemas in a Postgres database?

左心房为你撑大大i 提交于 2019-11-26 22:02:23
问题 I'm working on a project that needs to use hstore on multiple schemas. The 'public' schema, where the hstore extension was being installed isn't available everywhere, because my scope doesn't lookup at 'public'. On some tryouts, I've created the extension on a schema called 'hstore' and used the schema on every available scope (search path) used. Based on this, I've some questions: Is it ok to create a schema just for the extension? Or is it better to create the extension on every single