Questions tagged [postgresql-10]

for PostgreSQL questions specific to version 10

On 5 October 2017, PostgreSQL 10.0 was released. Major enhancements in PostgreSQL 10 include:

  • Logical replication using publish/subscribe
  • Declarative table partitioning
  • Improved query parallelism
  • Significant general performance improvements
  • Stronger password authentication based on SCRAM-SHA-256
  • Improved monitoring and control

Note that as of version 10, PostgreSQL has moved from 3 component version ids to 2 components, so 10.1 is a minor release.

The official documentation for this version is available at: http://www.postgresql.org/docs/10/static/index.html

632 questions
2
votes
1 answer

how can i make an pgAudit installation for my PostgreSQL10?

I wanted to install pgAudit on my CentOS 6 32-bit, I already installed PostgreSQL 10 + pgAdmin4 from PostgreSQL Linux run installer that I downloaded from DBEnterprise I followed the guide from here, here are the steps I followed : git clone…
Jack Doe
  • 31
  • 2
  • 9
2
votes
3 answers

Merge two sorted results with intermittently of one on two

Which way can I to use for merge two sorted result. Example : SELECT * FROM (VALUES (1),(2),(3),(4)) AS X(a); ┌───┐ │ a │ ├───┤ │ 1 │ │ 2 │ │ 3 │ │ 4 │ └───┘ (4 rows) And SELECT * FROM (VALUES ('A'),('B'),('C'),('D')) AS X(a); ┌───┐ │ a │ ├───┤ │…
Vincent
  • 391
  • 3
  • 10
2
votes
1 answer

Find if a PostgreSQL database exists with bash

I have a bash function where I check if a PostgreSQL database already exists. I capture the output. If database exist PostgreSQL returns the database name as response. function is_database() { local database=$1 local output=$(sudo -u…
user3541631
  • 3,686
  • 8
  • 48
  • 115
2
votes
1 answer

.pgpass file for more than one user

If I set PGPASSFILE to an explicit path like /home/user/.pgpass then it works fine and when logged in as the user that owns that file I can use psql for the entries in .pgpass.conf. The problem I have is that I need to have multiple accounts use…
Guerrilla
  • 13,375
  • 31
  • 109
  • 210
2
votes
1 answer

recovery.conf not getting changed to recovery.done after PITR

In recovery.conf, if we give recovery_target_time as 2018-09-07 03:25:46 (without EST) and restart PostgreSQL, recovery.conf is not getting changed to recovery.done. Yet PITR is successful and records/tables are restored only till given time. But…
Amit
  • 59
  • 1
  • 6
2
votes
1 answer

C/Postgres - Using palloc in a non-PG function

I'm currently implementing a user-defined data type - a linked list that mimics a set of integers in a file called intList.c, and hopefully used with intList.source to install it onto my Postgres server. So my questions are the following: Can I…
user10284022
  • 65
  • 1
  • 7
2
votes
1 answer

When using COPY FROM statement getting ERROR: null value in column "field_id" violates not-null constraint

I am using the COPY FROM command to load data from a file. The table is defined with identity column, which is not part of the file. CREATE TABLE APP2DBMAP ( FIELD_ID integer NOT NULL GENERATED BY DEFAULT AS IDENTITY, …
2
votes
2 answers

How can I verify an alter column data type change with sqitch postgresql?

I am making the following deploy change. Changing the value of a timestamp column to timestamptz. -- Alter the is_deleted flags to be timestamp with time zone alter table source_meta.sources alter column is_deleted set data type timestamptz …
nackjicholson
  • 4,557
  • 4
  • 37
  • 35
2
votes
1 answer

How to use default schema privileges on functions in Postgres in right way?

I am struggling to comprehend how default schema privileges work in Postgres. To me, they are something that supposed to ease administration load by issuing permissions automatically, but I found them bit unusable. I discovered several things that…
2
votes
1 answer

Pl\Python: issues when importing module

I have successfully setup plpyton3u extension in Postgresql 10 (64 bit) on my windows 10 (64 bit) machine. However, when i try to make a http request by calling requests module I am getting attribute error AttributeError: 'module' object has no…
2
votes
1 answer

Join all rows for each row in PostgreSQL

I have a dataset similar to the following: CREATE TABLE revenue ( employee_id int, job_id int, date date, revenue numeric (9,2) ); INSERT INTO revenue (employee_id, job_id, date, revenue) VALUES (1, 123, '2018-07-16', 100); INSERT…
Gab
  • 3,404
  • 1
  • 11
  • 22
2
votes
0 answers

Postgres 10 and pgadmin 4 not working in ubuntu 18.04

I installed postgres 10 and pgadmin 4 using the GUI installer provided by the enterprise db as usual i used in ubuntu 16.04. Everything getting successfully installed but nothing is working. Postgres server not getting started. Pgadmin 4 not…
Buddhika
  • 21
  • 3
2
votes
2 answers

Which database has more coverage for window functions MySQL 8.0 or PostgreSQL 10?

I am interested in computing statistics over moving window ranges
user855
  • 19,048
  • 38
  • 98
  • 162
2
votes
0 answers

Migrate dbms_crypto encrypted data from oracle to PostgreSQL

I want to migrate some of the tables with encrypted columns from oracle to postgres. In oracle, data is encrypted uding dbms_crypto. I am thinking that I will encrypt data in postgreSQL using pgp keys. My question is - 1. Do I need to decrypt the…
2
votes
1 answer

Why do partitioned tables in PostgreSQL take locks on other tables when being dropped?

This is using PostgreSQL 10.4 I have a partitioned table setup as: Table "public.foo_partitioned" Column | Type | Collation | Nullable | …
Whelchel
  • 303
  • 2
  • 10