Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
758 views

In my application n microservices are running on m nodes. Each microservice has its own database and is responsible for issuing VACUUM ANALYZE once in a while. Since the scheduling of this routine job ...
tobi's user avatar
  • 81
1 vote
2 answers
1k views

Table data +-----+----------------+--------+----------------+ | ID | Required_by | Name | Another_Field | +-----+----------------+--------+----------------+ | 1 | 7 August | cat | X ...
PolyglotPiglet's user avatar
1 vote
2 answers
607 views

So I forgot the password of the postgres user on my PostgreSQL server. I then changed all the md5 settings in the pg_hba.conf file to trust, restarted the server and then changed the password of the ...
JoeBe's user avatar
  • 1,310
0 votes
1 answer
67 views

I want to give all privileges to each table in the database。 sql as follows: CREATE OR REPLACE FUNCTION test() RETURNS void AS $$ DECLARE tb RECORD; sql1 TEXT; BEGIN FOR tb IN (select ...
wangzishuoshuoshuo's user avatar
0 votes
0 answers
1k views

Yesterday I sat the whole day installing ODBC drivers on my work computer. Why? so that I could query our pgadmin 4 database using postgresql 9.6, and populate my Excel workbook with info. Now, my ...
KarlPRO's user avatar
  • 39
0 votes
1 answer
1k views

I have a table called modifications with 42 columns and 84M rows. Total size is 64GB. I am running Postgres 9.6.11 on Amazon RDS with 16GB of RAM on a db.m4.xlarge instance. When i run a simple SELECT ...
Nicholas Tulach's user avatar
0 votes
2 answers
2k views

I want to get array of chd_id's for each prod_id, query below works but only with limit 1 i want exact result but with multiple rows select prod_id, array_agg((select * from ...
Christof's user avatar
  • 2,746
2 votes
0 answers
461 views

I'm using the PostgreSQL v9.6 database for my Django (v1.11) application and I want to move to PostgreSQL v11. Are there any changes that need to be made before? Any risks for my Django application? ...
Melissa's user avatar
  • 55
2 votes
2 answers
2k views

So an insert violates a constraint because a trigger modifies the data when it shouldn't for this case. Thing is, I already disabled the triggers that I thought were causing this, and the function ...
User1291's user avatar
  • 8,239
2 votes
1 answer
2k views

I have a some query that returns a table "code_1"(id - distinct). |---------------------|------------------| | id | status | |---------------------|----------------...
Ruslan Muhamadiarov's user avatar
4 votes
0 answers
779 views

So let's say I have a Model defined as below: from django.contrib.postgres.fields import JSONField class Job(models.Model): ... json_data = JSONField(default=dict, blank=True) The json_data ...
czarss's user avatar
  • 121
1 vote
1 answer
1k views

I have created a table score and also created a function and a trigger along with it. CREATE TABLE scores( --fields ); CREATE FUNCTION scores_before_save() RETURNS trigger AS $$ BEGIN -- ...
Chaitanya's user avatar
  • 3,654
13 votes
1 answer
17k views

I've ran into a need to figure this out on 9.6, but information on anything 9.6 or later would be appreciated. I'm having an issue with my application being blocked on a database call because it's ...
Pawel Veselov's user avatar
0 votes
0 answers
701 views

I am trying to execute the below SQL query, but it is giving me an error, because of large number of items I'm putting in the where clause. For column a 85,000 items. SELECT distinct a,b,count(*) FROM ...
zxcv's user avatar
  • 79
0 votes
1 answer
1k views

I have a medium-sized database (postgresql 9.6) with moderate traffic. The database is located on a virtual server, described as having 4cpu cores and 8192mb of ram. Currently I am backing up the ...
Donny Sutherland's user avatar
0 votes
1 answer
636 views

I have 2 tables, in one I create an element, in the other I save the details of said element in different languages. The first table: CREATE TABLE public.element ( idelement integer NOT NULL ...
des's user avatar
  • 67
0 votes
1 answer
67 views

Imagine a table like... create table study_value ( id serial primary key, study_id int not null references study (id), category text not null, subcategory int not null, p_value ...
kevlarr's user avatar
  • 1,161
0 votes
1 answer
462 views

I'm trying to understand how Postgres works. After reading this, https://www.postgresql.org/message-id/4572.1280671706%40sss.pgh.pa.us These subqueries are subselects because they don't reference ...
Todd's user avatar
  • 333
0 votes
0 answers
67 views

For almost a year, I have been using this sql to report on the rank of game profiles, based on the number of days that a game has been above the rank of 10: SELECT P.id, P.name, P.rank, COUNT(P.id) ...
Donny Sutherland's user avatar
0 votes
0 answers
75 views

I recently did a full vacuum on a range of tables, and a specific monitoring query suddenly became really slow. This used to be a query we used for monitoring, so would happily run every 10sec for the ...
Werner's user avatar
  • 811
3 votes
0 answers
2k views

We need to encrypt some columns in a postgresql 9.6 database. We are planning to use pgcrytpo's asymmetric key method for our requirement. we keep daily, weekly, monthly and yearly backups using ...
YogeshR's user avatar
  • 1,776
0 votes
1 answer
198 views

We've got a brand new coder on board. As one does, we'd like for him to have a local version of our PostgreSQL database to mess about with. Dumping the production database as follows worked without ...
Fenja Louwrens's user avatar
1 vote
1 answer
155 views

I have a postgres 9.6 table which has a json field config. I want to fetch records from this table where the json has a particular key value pair. My table is as follows CREATE TABLE features( ...
Chaitanya's user avatar
  • 3,654
0 votes
1 answer
81 views

I have a table containing info of tree nodes. element_type_id | root_id | parent_id | number_in_parent 4 1 1 1 4 1 1 ...
Alexey Shimansky's user avatar
0 votes
1 answer
4k views

Hi Im trying to change the default value of client_min_messages and log_min_messages from postgres user, it works in the session but then if I restart it comes back to default settings. Do I need to ...
Cilian Morales's user avatar

1 2 3
4
5
19