Questions tagged [postgresql-12]

For PostgreSQL questions specific to version 12.

PostgreSQL 12 is a major release of the PostgreSQL RDBMS.

Improvements include, but are not limited to:

  • performance improvements for partitioning and indexes
  • CTEs (WITH queries) are by default inlined for better query performance
  • JSON path queries per SQL/JSON specification
  • support for case- and accent-insensitive ICU collations
  • (stored) generated columns
  • extended statistics for “most common values”
  • page checksums can be enabled and disabled without initdb
  • authentication: support for encrypted GSSAPI authentication and LDAP server discovery
  • “pluggable storage” to add different table storage methods

More information regarding the release is available here.

554 questions
1
vote
1 answer

Optimizing GROUP BY of jsonb array values in Postgres

Updated for better hardware I have the following simplified schema in Postgres12 whereby a dataset has many cfiles and each cfile has property_values stored as jsonb: SELECT * FROM cfiles; id | dataset_id | property_values (jsonb) …
1
vote
1 answer

Mac Mini M1 Install Postgresql 12

Used homebrew to install postgresql@12 and it won't allow me to move forward after "starting". ~ ❯ brew services start postgresql@12 21s…
Rich_F
  • 1,830
  • 3
  • 24
  • 45
1
vote
1 answer

Alter table query working on Postgres 12 but not Postgres 11. syntax error near "("

Error: 19:20:44.737 [info] execute "ALTER TABLE listings\n ADD COLUMN search_tsvector tsvector\n GENERATED ALWAYS AS (to_tsvector('spanish', coalesce(title, '') || ' ' || coalesce(description, ''))) STORED;" ** (Postgrex.Error) ERROR…
Sergio Tapia
  • 9,173
  • 12
  • 35
  • 59
1
vote
1 answer

Installation of timescaledb failing

I've attempted to install timescaledb on Ubuntu 18.04 (32bit) with Postgresql 12 using: https://docs.timescale.com/latest/getting-started/installation/ubuntu/installation-apt-ubuntu When I run sudo apt install timescaledb-2-postgresql-12 I get the…
Stephen Yorke
  • 197
  • 1
  • 3
  • 13
1
vote
2 answers

Postgres full text search not working for some terms

I am using Postgres FTS to implement search. This is my sample tsvector: {'analyst':2A 'busi':1A} The query I am using is SELECT * FROM table_name WHERE tsv @@ to_tsquery('english', 'b:*') The result is showing correctly, but if I use 'a:*'…
1
vote
1 answer

Liqubase multitenacy issue on tenant schema update based on change log

as a requirement I have a spring boot project that uses multi tenant based on schema, when I run the application the migration goes fine on master schema(public), but when it tries to apply changes to all tenants (other schemes) it returns an…
1
vote
2 answers

How can I get a list of column definitions of the return type of a table returning function

I am working on postgres 12. I have some functions defined that have TABLE(...) as return values. I know how to query the information_schema and/or pg_proc to get the list of arguments of the function given its name and schema. I would like to do…
Paralife
  • 6,116
  • 8
  • 38
  • 64
1
vote
3 answers

Why is my Postgres database working for a while and then not able to "start server" once restarted?

Recently, I've started playing around with an old Raspberry Pi 3 b+, and I thought it would be good practice to host a Postgres database on my local network and use it for whatever I want to work through. I understand that running Postgres on a…
1
vote
1 answer

heroku-postgresql update broke my app, can I revert autorelease so that data in db stored before the release is saved?

When running heroku releases I see the following information: version description ldap time v364 Update HEROKU_POSTGRESQL_AMBER by heroku-postgresql heroku-postgresql@addons.heroku.com 2021/01/13 17:09:43 -0800 v363 Enable…
Ievgen
  • 1,999
  • 2
  • 12
  • 24
1
vote
1 answer

Count jsonb column where data is LIKE a sting in PostgreSQL 12

I have data in a jsonb column that looks like this... { "1": { "Answer": "Incorrect:No" }, "2": { "Answer": "Correct:The troubleshooting steps are correct", "Comment": "Computer was not restarted." }, "3":…
James
  • 191
  • 11
1
vote
1 answer

pgcrypto: unable to normal user

I need to enable pgcrypto on a postgresql 12 instance. I enabled the extension and checked it was ok: postgres=# CREATE EXTENSION pgcrypto; CREATE EXTENSION postgres=# SELECT digest('blah', 'sha256'); …
1
vote
3 answers

How to check if a column data is an arithematic progression in PostgreSQL

Suppose i have a column C in a table T, which is as follow: sr c 1 34444444444440 2 34444444444442 3 34444444444444 4 34444444444446 5 34444444444448 6 34444444444450 How can i verify or check if the values in Column C are…
1
vote
2 answers

Dockerized Django project not able to connect to host's postgres database

So I have a Django project which is running in Docker, which is trying to connect postgres which is running on host machine. But I am getting error web_1 | django.db.utils.OperationalError: could not connect to server: Connection refused web_1 | …
Ameya Joshi
  • 384
  • 1
  • 5
1
vote
0 answers

Postgresql restore dump via psql got 'permission denied for table'

I have database backup in format: dump.sql.gz (and chmod 777 on it) I need to restore in another server I logged via postgres and: createdb newdb gunzip < dump.sql.gz | psql newdb All is going well, but at one moment I got this…
1
vote
1 answer

How can i delete a specific name from my postgres array

Hello everyone I just started on working with postgreSQL and i was wondering if there is a simple solution to delete a single value from an array. In the screenshot im trying to delete a single name from my array. my PostgreSQL version: "PostgreSQL…
John
  • 97
  • 1
  • 7