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
2
votes
1 answer

Concurrent queries in PostgreSQL - what is actually happening?

Let us say we have two users running a query against the same table in PostgreSQL. So, User 1: SELECT * FROM table WHERE year = '2020' and User 2: SELECT * FROM table WHERE year = '2019' Are they going to be executed at the same time as opposed to…
2
votes
1 answer

PostgresSQL - Can't Insert values into table - ERROR: INSERT has more target columns than expressions

there were a lot of related questions to this topic, but none of the ones I found could solve my issue. I'm just trying to run a file to create a table in my database "test_scheduler". The table is created just fine; however, when I run the file to…
ezg
  • 715
  • 2
  • 7
  • 20
2
votes
1 answer

Procedure does not exist PostgreSQL

I've created procedure to insert new record CREATE OR REPLACE PROCEDURE PUBLIC."saveStudent"( "fName_val" character varying, "sName_val" character varying, patr_val character varying, "DoB_val" DATE, GROUP_ID INTEGER, …
Yehor
  • 23
  • 1
  • 3
2
votes
1 answer

Get room members, room's owner and admin at the same time in one query with grouped by id (unique) on PostgreSQL 12

I want to get room's member list, room's owner member in case of he doesn't exists in other table and admin member at the same time. Currently i fetch them individually. CREATE TABLE public.room_members ( id bigint NOT NULL, …
Dennis
  • 1,805
  • 3
  • 22
  • 41
1
vote
1 answer

Why don't I see partition pruning for my query based on generate_series()?

I'm using declarative partitioning in PostgreSQL 12: create table foo ( id integer not null, date timestamp not null, count integer default 0, primary key (id, date) ) partition by RANGE (date); With this simple request,…
1
vote
1 answer

How to fix 'type abstime does not exist' error when upgrading PostgreSQL from 11.20 to 12.15?

Trying to upgrade PostgreSQL from 11.20 to 12.15 and hitting the below error pg_restore: error: could not execute query: ERROR: type "abstime" does not exist I do understand that Data types abstime, reltime, and tinterval were removed by postgres…
om joshi
  • 13
  • 2
1
vote
1 answer

Function cypher(unknown, unknown) does not exist in Apache AGE

I am trying to execute a Cypher query on my Apache AGE graph database using the cypher function in PostgreSQL, but I am encountering an error. Here is the query I am trying to run: SELECT * FROM cypher('g1', $$ MATCH (n) return n $$); And here is…
Omar Saad
  • 349
  • 3
  • 8
1
vote
2 answers

DELETE excess rows per group with criteria

I have a Postgres table with these columns: id int8 , user_id varchar , is_favorite boolean , join_time timestamptz I want to delete some rows in this table with some conditions: Keep a maximum of 10 rows for each user_id. These…
1
vote
1 answer

PostgreSQL query filtering results by conditions based on jsonb

I have a data in my DB similar to next rows: id code custom 1 GOOG [{"customBreakdown":{"id":15,"name":"By PO"},"customBreakdownGroup":{"id":72,"name":"team"}},{"customBreakdown":{"id":14,"name":"By…
Sergii
  • 7,044
  • 14
  • 58
  • 116
1
vote
1 answer

Full Text search not working in Postgresql when Comma(,) Present in the database

I've implemented the full text search by using tsvector and tsquery. It is not working when there is a comma present in the database. I'm using the below query to search the result and it is not fetching any row. select ndc,ln60 from…
Nayan Rudani
  • 1,029
  • 3
  • 12
  • 21
1
vote
1 answer

How to make the psql query with left join faster?

I have two table one is migrate_data which is storing product details and another one is ws_data storing the d_id and parent(d_id's parent) where d_id is the process id I am having million records and want to join this two table using left join and…
Pygirl
  • 12,969
  • 5
  • 30
  • 43
1
vote
0 answers

terminating connection because of crash of another server process

We are facing this issue with POSTGRES 12.11, only on windows OS, with Linux OS, it works fine, if the executable that is using the database session crashes, then the entire database goes to recovery mode and restarts, in the Postgres log, we can…
1
vote
1 answer

why only first 1000 records inserted in dbeaver?

I am using Dbeaver 22.1.4 on Windows 10 Home Single 64bit. My RAM is 8 Gb. I want to insert 16 millions data from one server to another using dblink (All servers are Linux Ubuntu, running Postgresql 12). The query looks like this ( I split it to…
padjee
  • 125
  • 2
  • 12
1
vote
2 answers

How to call function with type cid in postgres

I need to call the function which has cid ass attribute from jdbc. The documentation says about type cid - "Command identifiers are also 32-bit quantities." I create simple function with cid CREATE OR REPLACE FUNCTION simplecid(in_param cid) RETURNS…
1
vote
1 answer

EXPLAIN (ANALYZE, SETTINGS) display wrong tablespace parameters

PostgreSQL 12.8 I have a tablespace called mattermost and a database mattermost-dev in it. postgres=# \l+ mattermost-dev List of databases Name | Owner | Encoding | Collate | …
Anton P
  • 27
  • 4