Data dodania Pytanie
2017-03-16 21:03 Can't connect to postgresql server after moving database files »
I want to move my postgresql databases to an external hard drive (HDD 2TB USB 3.0). I copied the whole directory: /var/lib/postgresql/9.4/main/ to ...
(0) odpowiedzi
2017-03-15 09:03 Postgres jsonb, nested array querying to hide specific fields »
I have a jsonb data of following format, with nested arrays { "outerArray": [ { "price": { "amount": 108.95, "currencyCod...
(1) odpowiedzi
2017-03-12 17:03 Postgresql is the server running locally and accepting connection on Unix domain »
I am trying to install postgresql-9.5 or postgresql-9.6 on my ubuntu 16.04 or 14.04 machine, after following the installation process using below comm...
(2) odpowiedzi
2017-03-12 16:03 FATAL: password authentication failed for user "root" postgresql »
I use PostgreSQL and Django (format Heroku) and have error FATAL: password authentication failed for user "root" Traceback (most recent call las...
(1) odpowiedzi
2017-03-12 00:03 postgresql create bitset from query by primary key »
I have a big table with primary autoincrement key. Sometimes i need to build bitmask for current filtering query on this table(which rows suit for my ...
(0) odpowiedzi
2017-03-10 21:03 guarantee uniqueness of table relationship »
So I have a table of states. CREATE TABLE public.states( state_code char(2) NOT NULL ); I have several different ways of grouping those states i...
(2) odpowiedzi
2017-03-10 03:03 Load .json file data to Postgres for Rails 5 API »
The terminal objective is to have 1.6 million records ingested into Postgres for discovery in my Rails 5 API app. I have 45 .json files each containin...
(0) odpowiedzi
2017-03-08 16:03 django models use multiple foreign keys vs integerfield »
I have a situation where I have multiple foreign keys in one table to other tables (a parent and a non related field. I have to come to find that if ...
(0) odpowiedzi
2017-03-08 10:03 Hibernate, PostgreSQL : Could not extract resultset, SQLState 25P02 »
I am working on one of our test-servers and getting an error from the hibernate when I am trying to call a method, where I get the Person object by it...
(1) odpowiedzi
2017-03-06 20:03 Filter a top level JSONB array document in Postgres? »
I have a Postgres table named 'events' with a column of 'id', 'name', 'invoices': Table "public.events" ...
(1) odpowiedzi
2017-03-02 23:03 Port 5432 doesn't listen on Raspberry PI »
I'm trying to run postgresql 9.4 on my Raspberry PI 3, but without success. My /etc/postgresql/9.4/main/pg_hba.conf host all all 10.0.1.0...
(1) odpowiedzi
2017-02-27 07:02 Store random data in Postgres database from Python »
I have the data in this form: data={'[{"info": "No", "uid": null, "links": ["";, ""], "task_id": 1, "created": "2017-02-15T09:07:09.068145", "fin...
(1) odpowiedzi
2017-02-25 12:02 How to track changes in any function in PostgreSQL »
I want track changes in any function in PostgreSQL. Example - Suppose, i have function fun_name() in postgesql database and i am doing modifications ...
(2) odpowiedzi
2017-02-24 18:02 Multi-Organization Architecture Play2Java+Heroku+Postgres »
I have an application developed on heroku cloud. Restful application developed with Play2 framework for Java, using Postgres database. Scenario: orga...
(0) odpowiedzi
2017-02-24 18:02 Postgres Not Using Memory »
I am running some spatial queries on tables that have records close to a billion. However, I cannot understand why Postgres is not using the memory in...
(1) odpowiedzi
2017-02-24 06:02 find average of json field in postgres rails »
id name overview created_at 1 john { 'keywords' => '10' } 2017-02-11 04:55:23 UTC 2 robert { 'keywords' => '20' } 2...
(0) odpowiedzi
2017-02-23 15:02 Is there a function that would allow me to output current index of an element in json array? »
I have the following sample Postgres SQL query. SELECT name, json_array_elements(myjson)->>'id' id FROM (SELECT 'Dingsda'::text AS name, json_b...
(3) odpowiedzi
2017-02-22 18:02 DEFAULT value setting of Postgres timestamp column not getting used correctly »
We are facing one issue related to storing DEFAULT value of timestamp in Postgres table from a Java based hibernate-spring REST API. The column is ...
(1) odpowiedzi
2017-02-22 13:02 postgres query explanation for aggregate with group by »
SELECT AVG(CAST(overview ->> 'keywords' AS INTEGER )) FROM reports GROUP BY DOMAIN; I have this in an existing project. I need to know what exa...
(1) odpowiedzi
2017-02-20 20:02 Why does creating a table with a serial column create a sequence with a max val of a bigint? »
I am a little confused and new to PostgreSql , I thought that serial = integer and bigserial = bigint, so I am confused why I see a sequence with a ma...
(2) odpowiedzi
2017-02-17 19:02 Postgres conditional unique constraint »
Pretend I have a users table where users are members of a specific tenant, and their e-mails are uniquely indexed to their tenant, like this: User id...
(2) odpowiedzi
2017-02-14 16:02 Postgres index 2 columns with condition »
Given a table of stores (~10k records) and a table of schedules(~200k records), I am trying to create and index for the planner to use, but it ignore...
(2) odpowiedzi
2017-02-14 10:02 How to replace Postgres array elements using SQLAlchemy ORM? »
Suppose we have a Postgres table with an integer array column xs: create table mytable ( id bigserial primary key, xs int[] ); Using Postgr...
(1) odpowiedzi
2017-02-14 10:02 Create nested json from sql query postgres 9.4 »
I need to get as a result from query fully structured JSON. I can see in postgres that there are some built in functions that may be useful. As an e...
(2) odpowiedzi
2017-02-13 16:02 how to create a table in SQLAlchemy using Postgres? »
Hi I'm trying to create a Table using SQLAlchemy in Postgres, it process all well but the table is not created in my Postgres server. My models.py fi...
(1) odpowiedzi
2017-02-13 07:02 Comma separated values with all rows from a table »
I have a Services table with three columns. Service sr_id lang alias 1 EN A 1 PA B 1 HI C 2 EN D 2 HI E Now, I...
(2) odpowiedzi
2017-02-09 12:02 Postgres extract value from jsonb array »
I have a jsonb field with an array like this one below: [ { "type":"discount", "title":"Discount 10%" }, { "f...
(2) odpowiedzi
2017-02-09 06:02 Composite Array Type as OUTPUT parameter in PostgreSQL »
I'm trying to insert data into composite array type in my function. It should accept data from composite array type of INPUT parameter and store data ...
(1) odpowiedzi
2017-02-08 22:02 ProgrammingError: cannot cast type double precision to time without time zone »
I have a django app with the following model: class Event(models.Model): # id = models.IntegerField(primary_key=True) event_type = models.For...
(2) odpowiedzi
2017-02-08 01:02 Read disk .sql file names with PostgreSQL »
does anyone know how to read file name from the client machine disk from the postgresql manager? In sql used the following: EXECUTE master.dbo.xp_cm...
(0) odpowiedzi
2017-02-07 20:02 Postgres- thin out extra records »
I have a couple of sensors that read temperature evey minute. I really only want approx every 20 minutes. I am wondering how I might construct a que...
(0) odpowiedzi
2017-02-06 01:02 Read .sql files to disk with PostgreSQL »
is there any way to read file names stored in a folder on the disk and filtering through the extension? This could do with sql server, but now I need ...
(1) odpowiedzi
2017-02-02 19:02 Postgresql - Regex split csv line with potentials quotes »
I would like to split a column that represent a csv line in postgres. Fields in this text line are delimited by pipe, sometime they are enclosed by qu...
(1) odpowiedzi
2017-02-02 00:02 Postgres remove backslash in jsonb field »
I have a jsonb field (let's call it "info") has value like this {"a": "foo", "c": "{ \"d\": \"dog\"}", \"b\": \"bark\"} Using Postgres how do I re...
(1) odpowiedzi
2017-01-31 13:01 Postgresql 9.6 concatenation of varchar »
I wonder why concatenation of two varchar gives me text type in result. select 'Plural'::varchar || 'sight'::varchar; Type 'text' of concatenation ...
(3) odpowiedzi