Questions tagged [postgresql-14]

Use this tag to indicate that your question is about PostgreSQL version 14. Questions concerning database administration should go to https://dba.stackexchange.com/

227 questions
0
votes
1 answer

PostgreSQL | JSONB: get the first path value

Given a JSON input: { "name": "John Doe", "age": 30, "address": { "street": "123 Main St", "city": "Anytown", "state": "CA" }, "phone": 1234567 } Is it possible (if so and how? I could not managed to do…
Shay Zambrovski
  • 401
  • 5
  • 21
0
votes
1 answer

could not connect server: connection refused(127.0.0.1)

I am trying to install PostgreSQL but unable to install in my windows Machine. The following Error Throwing. psql: could not connect server: connection refused . installing postgreSQL
Rajesh
  • 11
  • 4
0
votes
1 answer

Why client_hostname is filled while log_hostname=off?

I have to compare the postgresql server connection time with and without client_hostname resolution. A server is already running in the domain, which have log_hostname=on in postgresql.conf. So a reverse DNS lookup is used to get hostname from…
Youlounn
  • 23
  • 5
0
votes
1 answer

PostgreSQL: JSONB; get the key name by path

I have a requirement, on given path, I need to get the key name of JSONB, for example: '{ "name": "John Doe", "age": 30, "address": { "street": "123 Main St", "city": "Anytown", "state": "CA", "zip": "12345", "data": {"a":…
Shay Zambrovski
  • 401
  • 5
  • 21
0
votes
1 answer

Get XML value from XML data

I want to get only some part of XML value. Given sample data: Sam
dummy address
Mak
I want to return only name values…
MAK
  • 6,824
  • 25
  • 74
  • 131
0
votes
1 answer

Executing multiple SELECT queries in postgreSQL simultaneously

I'm trying to execute multiple postgreSQL SELECT queries at once. i.e: "SELECT * FROM table1; SELECT * from table2;" Preferably I'd then be able to fetch the results of first "SELECT * FROM table1;" and then the results of SELECT * from…
Quantitative
  • 51
  • 2
  • 6
0
votes
1 answer

Find Procedure/Function Dependencies

I want to find where all the stored procedure or function is getting used in database like in other procedures, functions, views etc. In MSSQL we used: DECLARE @sp nvarchar(100) SET @sp = N'proc_name' SELECT dm.*,o.type_desc FROM…
MAK
  • 6,824
  • 25
  • 74
  • 131
0
votes
0 answers

How can I possibly replicate data from Postgres version 9.1 to 14 using wal log shipping

I have the following painful scenario - I have a system running a standalone Postgresql 9.1 database at a client site in Europe - I cannot upgrade the db version It is running file based offline wal archive replication which produces replication…
0
votes
0 answers

Postgres AUTONOMOUS_TRANSACTION equivalent on the same DB

I'm currently working on a SpringBatch application that should insert some logs in case a certain type of error happens. The problem is that if the BatchJob fails, it automatically rollback everything done and that’s perfect, but it also rollback…
0
votes
0 answers

Postgres gin index on jsonb column not working

I have two jsonb columns in my table: etl_value and user_value. I have jsonb_path_ops gin index on both columns. "ix_variable_instance_versioned_etl_value" gin (etl_value jsonb_path_ops) "ix_variable_instance_versioned_user_value" gin…
na_ka_na
  • 1,558
  • 1
  • 12
  • 15
0
votes
1 answer

Protect Data on Postgres with pgcrypto

Someone can clarify the difference among different type of encrypting a database? I saw that a lot of people use pgcrypto, but they say that TDE is always the best choice. Is pgcrypto enough to respect GPDR? I have already installed pgcrypto and…
Davide
  • 35
  • 6
0
votes
1 answer

Postgres change year from one year to another year

I have tried to use the following in PostgreSQL but it adds about 2000 years to the year. I am needing to change the year from 2096 to 2001 or 2000 doesn't really matter. When I run this it adds about 2000 years to the year 2096 and makes it…
Blake
  • 1
  • 2
0
votes
1 answer

Create new index on specific partitions postgresql 14

I am using postgresql 14. I have a table which is ranged partitioned by days, the table's retention is rather small - i.e have 14 days worth of data (and dropping partitions older than 14 days). I would like to introduce a new index, and was…
nirtsruya
  • 3
  • 1
0
votes
1 answer

SQL Error [42601]: ERROR: syntax error at or near "("

I am trying to call this function CREATE or replace FUNCTION get_column_names(param text) RETURNS text AS $get_column_names$ DECLARE return_value text; x record; y int; begin return_value := ''; y := 0; …
gmaniac
  • 940
  • 1
  • 17
  • 33
0
votes
0 answers

How can generic functions can be used for computed fields in hasura?

I've a logs table, which is it contains all the actions (updated, created) taken by operators (admin users). On this table 2 of these columns (indexed as hash) target_entity and target_id Which respectively stores table name: table name of the…
siniradam
  • 2,727
  • 26
  • 37