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

How to get parse and rewriting time from PostgreSQL query plans?

The documentation clearly states The Planning time shown by EXPLAIN ANALYZE is the time it took to generate the query plan from the parsed query and optimize it. It does not include parsing or rewriting. Then how does one get this time which…
baceda9220
  • 41
  • 1
  • 4
0
votes
1 answer

How to check if function input in pg_proc has pseudo-type?

So I understand that I can query the PostgreSQL pg_proc table to see the input type of a registered function. Something like this: SELECT proname, pg_get_function_arguments(oid) FROM pg_proc Well, a function can have a type of 'pseudo-type' such as…
0
votes
1 answer

Writing PostgreSQL function in C: classic SPI_execq example - do not print as log message?

I am new to writing functions in C to be used with SQL. So far, I have looked at this example which executes a query using SPI. However, it prints the result as a log message. I was wondering how would this example have to change for me to return…
Zeruno
  • 1,391
  • 2
  • 20
  • 39
0
votes
1 answer

Sending data from POSTGRESQL trigger to a python TCP server

I'm trying to monitor a table in postgres database. I want to send every operation on this table (INSERT OR UPDATE OR DELETE) to a python tcp server. So I tried to follow this tutorial, but without any success. Here's the SQL script I'm using…
No name
  • 323
  • 4
  • 11
0
votes
1 answer

Grant READ ONLY permissions to all tables in all databases

I created new role named "support" in my PostgreSQL. Now I need grant "READ ONLY" permissions for this role an ALL exists databases/tables. Also I need automatically granted same permissions on each DB that will created in future. I unsuccessfully…
Slava Rozhnev
  • 9,510
  • 6
  • 23
  • 39
0
votes
3 answers

How to implement LIKE condition in postgresql version 12?

Select COUNT(*) from Table_one where timestamp LIKE '%2020-03-04%' AND speed_type = 'SPEED'; This query is showing error when I am implementing it via spring boot framework so I checked it out on postgresql and still it's showing error. The error…
0
votes
2 answers

How to make a Postgres background workers sleep and wake up on a signal?

PostgreSQL makes use of background workers to allow processes working in a concurrent fashion and they have an API for backend/extension developers to control them. So far, I have managed to successfully work with this feature in a demo extension,…
Zeruno
  • 1,391
  • 2
  • 20
  • 39
0
votes
1 answer

In Postgresql 12, what happens to the Master server data when it fails and slave server failsover?

I've built a Postgresql 12 HA system, one server is Master (s1) and the other is Slave (s2). Assume the Master server (s1) failed due to power outage, and the Slave server (s2) got promoted to Master, what will happen when I turn on the Master…
frisky5
  • 29
  • 10
0
votes
2 answers

Comparison string in Postgresql

My table: CREATE TABLE public.software ( software_name text COLLATE pg_catalog."default", version text COLLATE pg_catalog."default", ) In that table I store software and their versions which I use in some projects and I check whenever they…
Micheal Toru
  • 422
  • 4
  • 28
0
votes
0 answers

Summary date alloted wise

I want to know sales done by a each salesperson in different areas. There are many areas, and many salespersons. They are allotted to different areas periodically. There sales figures and time of sales are recorded. Area (table) id name 1 A 2 B 3…
Shh
  • 986
  • 9
  • 18
0
votes
1 answer

PostgreSQL parallel queries using SPI possible?

I am using PostgreSQL's Server Programming Interface (SPI) to build my postgres extension and execute my query. Please see this detailed example, or the following simple code sample: int ret = SPI_exec("SELECT * FROM ....", 0); We know that…
0
votes
1 answer

How to deal with a text[] array field type in Npgsql?

I have a Postgres 12 database with a single table: CREATE TABLE public.messages ( sender text COLLATE pg_catalog."default", "timestamp" timestamp with time zone, message_id bigint, text text COLLATE pg_catalog."default", priority…
Rob
  • 11,492
  • 14
  • 59
  • 94
0
votes
2 answers

PostgreSQL SSL doesn't work in cmd and java

Please help with the following problem ... OS - Windows. I want to configure SSL on Postgresql 12. Then my Java application will add entries to the database, delete, etc. I created certificates: CA, server, client. CA and server are located in the…
Hasuni
  • 21
  • 3
0
votes
0 answers

System.ArgumentOutOfRangeException?

I wrote the code below, but get the error "System.ArgumentOutOfRangeException" I don't know the source of the error , so guys can u help me , (excuse my bad english) the code: NpgsqlCommand cd = new NpgsqlCommand("insert into CLIENT values…
0
votes
0 answers

Aggregate function taking too long to execute in postgreSQL

I have recently deployed PostgreSQL database on Linux server. One of the stored procedure is taking around 20 to 24second.I have executed same stored procedure in blank database as well(no any row return) and it is taking same time. I found that…
Nayan Rudani
  • 1,029
  • 3
  • 12
  • 21