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
5
votes
3 answers

DBeaver + Postgres: Debug Function print to output/console

Is it possible to print to either the console window or the output window when debugging Postgres SQL using DBeaver? If so...HOW? Thanks!
5
votes
1 answer

how to use check constraint in postgresql for string

i am new to postgres how to create table with check constraint for column name say polluted which only have to accept 'yes' or 'no' values on insert. for other values it should promote error message My table name is vehicles
Ratan Uday Kumar
  • 5,738
  • 6
  • 35
  • 54
5
votes
5 answers

Postgresql 10.4 with pgadmin 4 v3.0 issue - Query Tools Initialized Error for Windows 10 x64 User

I had been running pgadmin4 v2.0 with no issues. This is happen when i upgraded my postgresql to 10.4 I have encountered a problem where pgadmin 4 v3.0 cannot initialize Query tools I have uninstall and reinstall the postgresql multiple times but it…
Iwan Tantoso
  • 63
  • 1
  • 6
5
votes
1 answer

Postgres Command line - clear/delete a query that I was in the middle of typing

Is there a way to quickly delete an entire query that I've been typing? To clarify, this would be a query I'm still typing, not something that's currently running. For example in bash, you can hit CTRL+C and it kills your current line, like: $…
rococo
  • 2,280
  • 2
  • 22
  • 37
5
votes
1 answer

could not load library plpython3.dll

I am getting an error while creating an extension in Postgresql version 10 could not load library "C:/Program Files/PostgreSQL/10/lib/plpython3.dll": The specified module could not be found CREATE EXTENSION plpython3u; Note: Using Postgresql 10…
Rahul Gour
  • 487
  • 2
  • 7
  • 21
5
votes
1 answer

PostgreSQL error: set-returning functions are not allowed in CASE

I tried to run this query in PostgreSQL 10: select e.errordescription, CASE WHEN e.reworkempid is not null THEN get_empname(e.reworkempid) else null end from error_log_gs e where e.qcworkpackageid=3012175 and…
srinu
  • 51
  • 1
  • 1
  • 3
4
votes
1 answer

Remove "identity flag" from a column in PostgreSQL

I have some tables in PostgreSQL 12.9 that were declared as something like -- This table is written in old style create table old_style_table_1 ( id bigserial not null primary key, ... ); -- This table uses new feature create table…
Xobotun
  • 1,121
  • 1
  • 18
  • 29
4
votes
1 answer

How to do `UPDATE...SET...FROM` using knex?

What's the most terse way I can express an UPDATE...SET...FROM SQL statement using knex? This is what I've got currently: const query = knex('user_subscriptions').update(subscription).toQuery() + knex.raw( ' from plans p where…
ffxsam
  • 26,428
  • 32
  • 94
  • 144
4
votes
0 answers

How to enforce automatic timestamp for django model in database level?

I have a django abstract model that goes like this: class AbstractAppendOnly(models.Model): created_at = models.DateTimeField(auto_now=True, editable=False) db_note = models.TextField(default=None, null=True) class Meta: …
exilour
  • 516
  • 5
  • 12
4
votes
1 answer

Group by query not using index

This is my query - select bill, render, count (*) from dx group by bill, render This is the index I created for it - CREATE INDEX bill_render ON dx (bill, render); Why is my query not using the index with and without the count(*)? "Finalize…
Aaron
  • 1,345
  • 2
  • 13
  • 32
4
votes
1 answer

Permission denied to drop objects

Running drop owned by ; gives me ERROR: permission denied to drop objects. I can login/create/insert/update/alter etc fine. Created the db and role like so: sudo psql -U postgres CREATE USER WITH PASSWORD ''; CREATE…
Robert C. Holland
  • 1,651
  • 4
  • 24
  • 57
4
votes
4 answers

pgAdmin4 - postgresql application server could not be contacted

I know this question may be marked as repeated, but keep in mind that I have searched for numerous posted solutions and my error has not been fixed. When starting postgres, I get the following error: postgresql application server could not be…
Yan Esteves
  • 98
  • 1
  • 1
  • 5
4
votes
1 answer

How to extract elements of a JSONB array?

Running PostgresSQL v10.5. In my table table_a that has a column metadata which is of type jsonb. It has a JSON array as one of it's keys array_key with value something like this: [{"key1":"value11", "key2":"value21", "key3":"value31"}, …
axay
  • 1,657
  • 2
  • 18
  • 22
4
votes
2 answers

Combine CTE along with an IN, in PostgreSQL

So I have this simple query in PostgreSQL 10. with bunch_of_things as ( select vans_id from shoes where adidas_id = 1 ) select * from vans where vans.id in (bunch_of_things) ; I am getting an error column "bunch_of_things" does not exist I…
slevin
  • 4,166
  • 20
  • 69
  • 129
4
votes
1 answer

Slow update on update query Postgresql

I run the an update query on a table of 36 millions of lines. This request takes 45 minutes to run. processed field is indexed, and the database is on a ssd. UPDATE batch_item SET processed=true do you have a clue why this is so long?
d3cima
  • 729
  • 1
  • 10
  • 31
1 2
3
42 43