postgresql-9.5 Questions
4
I have installed [email protected] and Postgis via Homebrew. However, installing Postgis via Homebrew installs the latest version of Postgresql at 10 as dependency and pinning Postgresql at 9....
Spaetzle asked 2/11, 2017 at 15:43
2
I have a table
CREATE TABLE foo
(
f0 int,
time_stamp timestamp,
CONSTRAINT foo_pk PRIMARY KEY (f0)
)
I need to write to this table in high volumes, so performance is key. Sometimes, I w...
Wearproof asked 30/3, 2016 at 15:21
4
Default timezone is UTC.
But I want to change it to GMT+2.
I tried as below.
alter database governance set timezone = 'GMT+2';
But it does't work.
How can I manage it?
postgresql version is 9....
Loutitia asked 6/6, 2017 at 15:37
3
Solved
I am very new to postgresql.
I want to store below json object into postgresql database.
{
"host": "xxx.xxx.xx.xx"
"type": "OS"
}
can you please advise me what data type should I use in postg...
Nerve asked 30/9, 2018 at 11:20
4
Couldn't able to import psycopg2
Output in python console:
import psycopg2
Traceback (most recent call last):
File "", line 1, in
File "/home/user/.py_virtualenvs/verb_py3/lib/python3.5/s...
Mobocracy asked 10/7, 2019 at 21:14
3
Solved
the PostgreSQL-Documentation describes how to create or drop a row policy, but not how to get a list of the existing ones.
My aim is to be able to know, by using pgAdmin, if there are row policies ...
Passifloraceous asked 29/6, 2016 at 15:35
2
Solved
In PostgreSQL 9.5 I've decided to create a materialized view "effects" and scheduled an hourly concurrent refresh, since I wanted it to be always available:
REFRESH MATERIALIZED VIEW CONCURRENTLY ...
Eccentric asked 20/9, 2018 at 9:7
4
Solved
I am looking for help in adding a value 10 to an int[] in PostgreSQL 9.5.
Looking at the documentation I should be able to use this format to update it but it is not working:
int[] + int push ele...
Uninhibited asked 16/11, 2016 at 18:50
1
Solved
I have 170 Alter Drop Constraint statement, 120 Truncate table, 120 Insert table and 170 Alter Add Constraint. All of these should be run in one in one script as batch script and I'm using PGADMIN ...
Universalize asked 29/1, 2019 at 14:51
2
I have a table named events in my Postgresql 9.5 database. And this table has about 6 million records.
I am runnig a select count(event_id) from events query. But this query takes 40seconds. This ...
Obara asked 6/3, 2019 at 8:53
3
Solved
I need to temporary disable one PostgreSQL trigger in a transaction, but without hardlocking table. Does someone know if it is possible?
Something like this without locking table and disabling tri...
Jameson asked 9/6, 2016 at 15:54
2
I have a client made a backup using pg_dump and its size is almost 700GB while the pg_database_size is just about 195GB. I already did run the VACUUM FULL but the result still the same.
How could ...
Walliw asked 17/4, 2020 at 9:49
3
Solved
I am accessing an array (a json object called 'choice_values') in a jsonb field, and would like to parse its contents into a comma-separated text field.
SELECT
jsonb_array_elements(doc -> 'for...
Zacheryzack asked 20/7, 2016 at 5:58
1
Solved
I have successfully installed postgresql and added path to my environment variable in windows 10. But the problem is when i try to run psql postgresql in command prompt it gives error saying
C:\U...
Thereby asked 6/12, 2019 at 9:11
2
Solved
When trying to ALTER TABLE in Postgres 9.5 to create foreign key constraint: from product_template.product_brand_id to product_brand.id
ALTER TABLE public.product_template
ADD CONSTRAINT product...
Chilopod asked 19/9, 2017 at 9:49
2
I have pretty complex JSONB stored in one jsonb column.
DB table looks like:
CREATE TABLE sites (
id text NOT NULL,
doc jsonb,
PRIMARY KEY (id)
)
Data we are storing in doc column is a com...
Nonconcurrence asked 14/8, 2017 at 18:39
2
Solved
Say I have the following enum:
CREATE TYPE "my_enum" AS ENUM('value1', 'value2', 'value3');
I would like get remove value3. From what I can see in the documentation and in previous threads, I ac...
Casebook asked 26/6, 2019 at 15:57
2
Is it possible to do upsert in Postgres 9.5 when conflict happens on one of 2 columns in a table.? Basically I have 2 columns and if either column throws unique constraint violation, then I would l...
Westfalen asked 27/1, 2016 at 8:15
1
Solved
I got this error.
ERROR: column "name" does not exist LINE 6:
SELECT JS, location, location->>Name
^ SQL state: 42703 Character: 278
from this query
WITH JsonTable AS
(
SELECT...
Necking asked 3/3, 2019 at 3:18
1
Solved
I have the following table
CREATE TABLE "prm_project_service_product_and_services" (
"id" BIGSERIAL NOT NULL,
"name" VARCHAR(60) NOT NULL,
"note" VARCHAR(256) NOT NULL,
"version" BIGINT DEFAU...
Salts asked 2/2, 2019 at 16:19
1
Solved
So as I recently came to understand, the default that we specify in a Django field is merely for filling up pre-existing rows, and doesn't function as a "real" default value at the database level. ...
Kansas asked 10/12, 2018 at 12:55
1
Solved
I have table documents, I want to select columns foo and bar. And also the column comments which is jsonb.
But in comments I only need the last element that meets condition "isUser":false.
"sele...
Evasive asked 11/11, 2018 at 9:44
1
I have a simple count query that can use Index Only Scan, but it still take so long in PostgresQL!
I have a cars table with 2 columns type bigint and active boolean, I also have a multi-column ind...
Rafiq asked 29/4, 2018 at 5:12
1
I am using Postgres 10.3.
Based on this question, I use:
ALTER TYPE name RENAME VALUE attribute_name TO new_attribute_name
to rename an enum value.
But I need a solution that works with Postgr...
Sonneteer asked 14/9, 2018 at 7:10
4
Solved
Writable CTEs were considered a solution to UPSERT prior to 9.5 as described in Insert, on duplicate update in PostgreSQL?
It is possible to perform an UPSERT with the information whether it ended...
Wallin asked 13/1, 2016 at 9:23
© 2022 - 2024 — McMap. All rights reserved.