Questions tagged [postgresql-9.3]

PostgreSQL version 9.3

Specifically for PostgreSQL version 9.3 (Released Sep 09, 2013)

580 questions
17
votes
1 answer

Version control tool for postgreSQL

Can anyone suggest a windows based version control tool for PostgreSQL. Thanks and Regards, GP
user36428
  • 179
  • 1
  • 1
  • 3
5
votes
2 answers

function json_populate_record(..., text) does not exist

I went by the example from the docu which went fine: select * from json_populate_record(null::x, '{"a":1,"b":2}') But my self-constructed JSON simplified similar to this did not work :-( -- p_some_num of type int select * from json_populate_record(…
Andreas Covidiot
  • 290
  • 1
  • 3
  • 10
4
votes
2 answers

getting records for yesterday day starting till ending PostgreSQL

Currently my application is running over 2 dbs one is snapshotDB one is evercamDB. In snapshotDB we are saving records now it want to retrieve them , currently am using this query select camera_id,count(*) as snapshot_count from snapshots where…
Junaid Farooq
  • 281
  • 1
  • 6
  • 16
1
vote
1 answer

Slow query performance on simple select

I have 2 tables: Organization (2.500.000 rows) City (35.000 rows) 'Organization' has 'city_id' set as foreign key to 'cities'.'id': Organization: ALTER TABLE public.organization ADD CONSTRAINT organization_pkey1 PRIMARY KEY(id); ALTER TABLE…
Termos
  • 113
  • 2
1
vote
1 answer

Count records with same id but different column value

I have the following table: +------+------+ |userID|Name | +------+------+ |1 |sport | +------+------+ |2 |it | +------+------+ |3 |game | +------+------+ |1 |sport | +------+------+ |1 |game | +------+------+ |3 |it …
gogasca
  • 133
  • 1
  • 1
  • 6
1
vote
2 answers

Postgres 9.3 - Problem to initialize folder as a data folder

I have a problem when I want to initialize a folder as a data folder: postgres@ccruzado-test01:~$ /usr/lib/postgresql/9.3/bin/initdb -D /datadrive/postgresql/ The files belonging to this database system will be owned by user "postgres". This user…
1
vote
1 answer

Strange Intermittent Postgres Performance Issue (docker?)

I am running a local Postgres 9.3 in a docker container with a temporary database that is used for some file import operations. The basic scenario is: Load files into input tables INSERT from a SELECT into the output tables (transform) Read the…
Andy Davis
  • 293
  • 1
  • 2
  • 9
0
votes
0 answers

Can I manage NULL = 'SomeDefault' in the database so applications and SQL don't have to remember this optimization?

I have a table with lots of default values, and want to store very common values as NULL to save space, without forcing my SQL statements or application logic to become overburdened with conditionals. Ideally, I would like this equivalent of an…
Chris Betti
  • 477
  • 1
  • 5
  • 11
0
votes
1 answer

Postgres Error for table

I want to create this table, but i can’t, Look this error. CREATE TABLE ATTR( window character varying(64) NOT NULL ); ERROR: syntax error at or near "window" LINE 2: window character varying(64) NOT NULL
0
votes
1 answer

Query function won't take rows with given default value

I have only recently delved into the depths of PostgreSQL and have finally hit a snag. There are 3 tables, Notes, Tags, and Notes_Tags (Many to Many). Some Notes do not contain tags, but still need to be displayed. Maybe there is something that I…
cyber_dave
  • 103
  • 3
0
votes
1 answer

Do PostgreSQL toasted fields use any per row, in-table space?

I understand that PostgreSQL will store large fields in a separate storage space automatically. When this occurs, is there anything stored per row for that field in the table? A reference or hint of some kind?
Chris Betti
  • 477
  • 1
  • 5
  • 11
0
votes
1 answer

Failover in Streaming Replication

I have one doubt on master to slave replication in streaming replication in postgresql. I confgured ONE Master and One Slave with streaming replication in my system If Master fails slave act as a master then it is fine. My Question: 1) who will be…
Vijay K
  • 1
  • 1
0
votes
1 answer

How to query row containing the given element inside a JSON column in Laravel PostgreSQL

All I have is a PostgreSQL table that has a JSON column called agents. See below: SELECT agents FROM cnms_rosters; Result: agents ------------------ [1,13,3,16,15] [12,13,14,15,15] [11,73,55,16,44] (3 rows) This column contains the…
Yves Gonzaga
  • 109
  • 3
0
votes
1 answer

Postgresql boolean

Postgresql stores boolean value TRUE or FALSE, while I am passing 1 or 0. And I want to store as 1 or 0 instead of TRUE or FALSE. Can anyone help me on this please?
0
votes
1 answer

Run script on multiple schemas on PostgreSQL DB

I need to run a huge migration script on multiple schemas on PostgreSQL 9.3 server. I want output to be in a .txt format if this failed on any schema. Would you be able to help me on this? Details: All schemas are of similar structure and I have the…
Vinod
  • 1
  • 1
1
2