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
1
vote
0 answers

postgresql : **ERROR: path element at position 1 is not an integer:**

I am trying to update a field value in jsonb column with text value present in another column but getting some syntax errors; not getting any solution. '[ { "Edgeid":10, "Weight":100, "Active":1, …
VBAGuy
  • 172
  • 1
  • 9
1
vote
0 answers

how can i load csv file to postgres database using lambda function with "java/eclipse"

I have to load my CSV file to the PostgreSQL database using AWS lambda function with the help of java code. I have tried the same with java code don't know how to use it using lambda function. Below is the java code I used - package net.codejava; …
Riyo
  • 11
  • 1
1
vote
1 answer

rails 4 deep_clone different in development/staging and production

I am running a rails 4 app. Everything works fine so far, but now a strange error happened with deep_clone from the gem deep_clonable. I made a controller method to duplicate an entry (Interaction model/controller). interactions_controller.rb: def…
1
vote
0 answers

Postgres upgrade(10.9 to 12.2) is failing sporadically

Postgres upgrade(10.9 to 12.2) is failing sporadically We have upgraded postgres cluster from 10.5 to 12.2 10.5 version has also has extension lib PLV8. But we want to get rid of that extension in the upgraded version (12.2) Before upgrade, we have…
1
vote
1 answer

Data retention in PostgreSQL

Is there a way to add retention on PostgreSQL? I've tried partitioning but seems to be a problem when querying between multiple partitioning regarding performance. This seemed to be a better way because you can delete one partition in a fast way…
Shagoon
  • 11
  • 1
  • 5
1
vote
1 answer

Foreign-data wrapper "postgres_fdw" does not exist (even if it does)

Using PostgreSQL 10.10, from superuser postgres: CREATE EXTENSION postgres_fdw; GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO my_user; Then when doing the following from my_user: CREATE SERVER my_server FOREIGN DATA WRAPPER…
Jivan
  • 21,522
  • 15
  • 80
  • 131
1
vote
1 answer

PostgreSQL11 xpath query not working properly

When I execute below query in Postgres 10.12, it works properly. SELECT (xpath('./sid/text()', c.node))[1]::text::bigint AS STUDENT_ID, (xpath('./name/text()', c.node))[1]::text AS STUDENT_NAME from ( select unnest(xpath('/data',…
Nirav Patel
  • 1,304
  • 2
  • 13
  • 30
1
vote
0 answers

PostgreSQL 10 not archiving some WAL files

strong textI have a strange case in some PostgreSQL instances that I monitor. First the software versions and setup of a specific one: Windows Server 2012 Foundation PostgreSQL 10.10 x64 archive_command = 'copy% p "D: \\ backup \\ wal \\% f" /…
Norba
  • 11
  • 4
1
vote
0 answers

data type point[] has no default operator class for access method "gist"

I'm having trouble creating an index for point[] column. create table test (pt point[]); // Table created create index pt_idx on test using gist (pt); // Error creating index The error I'm getting is: data type point[] has no default operator class…
Hemanth S R
  • 1,115
  • 2
  • 16
  • 27
1
vote
1 answer

PostgreSQL - Why a privileged user can't access newly created partition

Why a privileged user can't access newly created partition? PostgreSQL version: 10.0 Suppose my PostgreSQL sever has a user called app with following permissions: GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA public TO app; GRANT USAGE ON ALL…
MengCheng Wei
  • 655
  • 2
  • 6
  • 10
1
vote
2 answers

jsonb_each function Returns null values Not Castable To null::INT

Let me explain: [1] [no error] SELECT (('{"a": null}'::JSONB)->>'a')::INT; [2] [error here] SELECT (t.value::TEXT)::INT FROM jsonb_each(('{"a": null}'::JSONB)) AS t I have to use jsonb_each function. How can i make SQL number 2 return null?
gokaysatir
  • 125
  • 2
  • 11
1
vote
1 answer

Query on partitioned table on PostgreSQL

I have a table partitioned by year. With this query : select * from myTable where year between '2018' and '2020' the query plan is good, only 2018,2019,2020 partitions are used. But with this query select * from myTable where year between '2018'…
yoann
  • 25
  • 1
  • 6
1
vote
2 answers

PostgreSQL: exclude complete jsonb array if one element fails the WHERE clause

Assume a table json_table with columns id (int), data (jsonb). A sample jsonb value would be {"a": [{"b":{"c": "xxx", "d": 1}},{"b":{"c": "xxx", "d": 2}}]} When I use an SQL statement like the following: SELECT data FROM json_table j,…
1
vote
1 answer

How to concatenate strings to form a json object in Postgres?

I have a string coldata->>'f1' which I need to send dynamically to fetch JSON object. What I want exactly is: RAISE NOTICE 'OBJECT %', fc_data->'firstname'->>'value'; In my case I am getting the firstname dynamically in the variable coldata->>'f1'…
Sai sri
  • 515
  • 12
  • 25
1
vote
1 answer

Scheduler in Postgres

I have an Oracle function called by an Oracle Scheduler that resets a sequence everyday. I have to migrate it to RDS Postgres, but AWS doesn't support the extensions pg_cron & pgscheduler. Is there a workaround to do this in RDS Postgres?
Mano
  • 601
  • 10
  • 32