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
1
vote
1 answer

postgreSQL - fill in blank date rows per ID

I have a table which looks like this: ID money_earned days_since_start 1 1000 1 1 2000 2 1 3000 4 1 2000 5 2 1000 1 2 100 3 I want that rows, without a days_since_start (which means that the money_earned column was empty that…
NightHawk
  • 47
  • 6
1
vote
1 answer

IMPLICIT to EXPLICIT conversion SQL state 42601 postgres

I am doing a course on PostgresSQL. I am running the below select as per the course video, and it is supposed to be about factorials (new to this): select 20 !; it returns this error on my machine but not on the instructors, as shown on his…
1
vote
1 answer

postgresql: Restoring database backup is very slow and used resources are underutilized significantly

I am trying to restore backup of postgresql database on my personal computer. My OS is Ubuntu 18 and I use postgresql of 14 version. Volume of .sql file is 52G, but after waiting for 6 hours the volume of target database increased only to 120 MB.…
SwipeZ
  • 57
  • 1
  • 6
1
vote
1 answer

Error: Consult the last few lines of "pg_upgrade_dump_1.log"

I wanted to ugrade my postgresql database from v10 to v14 I have run these commands in windows command prompt: C:\Users\mahajan>CD C:\Program Files\PostgreSQL\14\bin C:\Program Files\PostgreSQL\14\bin>SET PGPASSWORD =1234 pg_upgrade -d "c:\Program…
1
vote
1 answer

pg_dump on a specific schema outputs no tables and no data

mydb=# select version(); version …
Bertie
  • 17,277
  • 45
  • 129
  • 182
1
vote
3 answers

SQL query to filter where all array items in JSONB array meet condition

I made a similar post before, but deleted it as it had contextual errors. One of the tables in my database includes a JSONB column which includes an array of JSON objects. It's not dissimilar to this example of a session table which I've mocked up…
Michael Fich
  • 496
  • 1
  • 7
  • 15
1
vote
2 answers

Count null values in each column of a table : PSQL

I have a very big table but as an example I will only provide a very small part of it as following:- col1 col2 col3 col4 10 2 12 13 4 11 0 1 3 …
Shawn Brar
  • 1,346
  • 3
  • 17
1
vote
1 answer

PostgreSQL: create view everytime a table is updated

I'm new to Postgresql 14; I am trying to create a trigger on a table that creates a view every time the table is modified by INSERT / UPDATE / DELETE. After applying the trigger I am getting this error when trying to update/insert/delete anything in…
stefd
  • 11
  • 3
1
vote
1 answer

Error while using createdb command postgresql on windows 10

I am a new user of PostgreSQL, and I am learning it so that I can use it with Django, so I am trying to use the createdb command to create a new database, but even though I am entering the correct password for my account, I am getting this error. I…
1
vote
0 answers

Running Ora2Pg with PostgreSQL 14

I've got PostgreSQL v14 server to migrate data from old Oracle server using ora2pg tool version 22.1. There is a problem when i try to execute ora2pg -c properties.conf, that gives me the following output: [========================>] 2/2 tables…
Squirrel
  • 45
  • 4
1
vote
2 answers

Why are scans of CTEs and temporary tablest parallel restricted?

From the PostgreSQL manual: The following operations are always parallel restricted: Scans of common table expressions (CTEs). Scans of temporary tables. Why are parallel scans of CTEs and temporary tables restricted?
0
votes
1 answer

Why are there 2 unencrypted rdsadmin connections to my RDS instance?

When I look at unencrypted connections to my RDS instance, I see 2 from the rdsadmin user. These are not coming from my application, and must be managed by AWS. Is there any documentation about these, or how to force them to use encryption? select *…
Kevin
  • 1,080
  • 3
  • 15
  • 41
0
votes
1 answer

Why Postgres does not use GIN index if I specify a LIMIT clause?

I have a table containing about 5 million records and a GIN index on Barcodes column. I have this query: SELECT T1.* FROM public."Skus" AS T1 WHERE (T1."Barcodes" && '{ "THE_BARCODE" }') LIMIT 11; It takes very long (seconds) and the explain…
0
votes
0 answers

generate column while creating the table in PostgreSQL - generation expression is not immutable error

I am planning to create a table with generate columns CREATE TABLE fy_calendar1( date date not null, day varchar generated always AS (DATE_PART('day', date)) stored, dow_in_month varchar generated always AS (DATE_PART('day', date))…
Raju
  • 27
  • 5
0
votes
0 answers

PostgreSQL 14.2 semicolon on query got error unterminated quoted string

I got issues that cannot resolve, I have sql query that when add semicolon its error. here my query: INSERT INTO engine_migrations ("name", "description", "schema", "created_at", "up", "down", "active") VALUES ( 'Create Table users', …
Dicky Raambo
  • 531
  • 2
  • 14
  • 28