Open4
BRL
Heroku Postgres, いつのまにか Aurora になっている。
d6dfvpckgc7qs=> select AURORA_VERSION();
aurora_version
----------------
16.2.2
(1 row)
pg_bigm は使えないけど、pg_trgm は使える。
d6dfvpckgc7qs=> CREATE EXTENSION pg_bigm;
ERROR: permission denied to create extension "pg_bigm"
HINT: This extension is not specified in "rds.allowed_extensions".
d6dfvpckgc7qs=> CREATE EXTENSION pg_trgm;
ERROR: extension "pg_trgm" already exists
d6dfvpckgc7qs=>
Aurora になったせいか、ロケールまわりがCになっている。
brl::DATABASE=> select name,setting,context from pg_settings where name like 'lc%';
name | setting | context
-------------+---------+---------------
lc_messages | | rds_superuser
lc_monetary | C | user
lc_numeric | C | user
lc_time | C | user
(4 rows)
brl::DATABASE=>
Standard は Aurora ではないので、とりあえずはこれを使うのがいいかもしれない。pg_trgm + UTF-8 ができる。
brl::HEROKU_POSTGRESQL_WHITE=> select AURORA_VERSION();
ERROR: function aurora_version() does not exist
LINE 1: select AURORA_VERSION();
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
brl::HEROKU_POSTGRESQL_WHITE=> select name,setting,context from pg_settings where name like 'lc%';
name | setting | context
-------------+-------------+-----------
lc_messages | en_US.UTF-8 | superuser
lc_monetary | en_US.UTF-8 | user
lc_numeric | en_US.UTF-8 | user
lc_time | en_US.UTF-8 | user
(4 rows)
brl::HEROKU_POSTGRESQL_WHITE=> CREATE EXTENSION pg_bigm;
ERROR: could not open extension control file "/usr/share/postgresql/16/extension/pg_bigm.control": No such file or directory
brl::HEROKU_POSTGRESQL_WHITE=> CREATE EXTENSION pg_trgm;
CREATE EXTENSION
brl::HEROKU_POSTGRESQL_WHITE=>