Data dodania Pytanie
2017-02-08 08:02 How to use volume in docker compose for postgres? »
Here is the image I am using. I named it posgres_test If I run the image individually docker run -i -t -v="test_volume:/var/lib/postgresql" -p 5432...
(3) odpowiedzi
2017-02-08 08:02 Targeting specific objects in jsonb array »
I need to select rows from table that match specific criteria which involves jsonb object field comparison. In the example below, I'd like to get onl...
(1) 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 13:02 SQL - If Select returns nothing then do another Select »
I'm currently trying to do an SQL query that can detect if a SELECT query returns nothing, and then do another one if that is the case. Here is what ...
(2) odpowiedzi
2017-02-07 09:02 @NotNull on subclass getter affects parent class table »
I have a question related to javax.validation.constraints.NotNull annotation. In my project i do have classes tree like following : @Inheritance(stra...
(3) odpowiedzi
2017-02-07 08:02 How can I implement the excel's SMALL and LARGE functions in Postgres? »
LARGE lets you find the nth largest value in an array. SMALL lets you find the nth smallest value in an array. I want to do something like select SMA...
(1) odpowiedzi
2017-02-07 00:02 Why would updates to a paper_trail-enabled model fail silently? »
Rails 5.0.0, Heroku Postgres 9.6.1 m = MyModel.create(foo: 'bar') => #<MyModel foo: 'bar'> m.foo = nil => nil m.save => true m.reload ...
(0) odpowiedzi
2017-02-06 22:02 Why does my pg_query update method skips row? »
I'm just a beginner with php, even more so on PostgeSQL. I can say that my knowledge over php, json and sql is very limited. I have created an update...
(1) odpowiedzi
2017-02-06 14:02 Unable to fetch ID using Postgres Stored Function - Bad value for type int »
I am trying to get location information from the schema Location. Postgres version is 9.3.15 and maven jar used is 9.4-1200-jdbc4 ubuntu 14.04 LTS. F...
(1) odpowiedzi
2017-02-06 07:02 Why does PostgreSQL complain about type when I use CASE to SET a field to NULL? »
I have the following query: UPDATE managed_avs SET own_license_expires_at = CASE id WHEN 50 THEN NULL END WHERE id in (50) I get the follow...
(1) 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-05 15:02 How to pass a parameter and cast to a certain data type inside a function? »
I'm attempting to write a plpgsql function to insert a record into a table that expects some timestamps in certain columns. Here is the function: cre...
(2) odpowiedzi
2017-02-05 14:02 Doctrine2 native query does not hydrate custom type »
In a ZF2 - PostgreSQL application, I want to use Doctrine2 native queries to build paginator lists. So, it works great if any custom Doctrine / Pgsql...
(1) odpowiedzi
2017-02-05 09:02 Initialize model with integer array in Postgres »
I'm using postgres 9.6.1, Rails 4.2.0, and the following migration: class CreateStageBatches < ActiveRecord::Migration def change create_tab...
(1) odpowiedzi
2017-02-04 18:02 Looped CopyTo Query »
I have the following table: writing_agent_number|agent_name |individual_sub_name -------------------- ----------------- -------------------- 30...
(1) odpowiedzi
2017-02-04 11:02 Mattermost 3.6.2 Ubuntu 16.04 pgsql 9.5 db dial err issue »
I'm facing of an issue when trying to test mattermost server sudo -u mattermost ./platform [2017/02/04 11:19:31 CET] [INFO] Loaded system translatio...
(1) odpowiedzi
2017-02-04 09:02 How to get inet in entity class in spring using hibernate »
public List getAllEmployees() { return sessionFactory.openSession().createSQLQuery("select * from employee order by eid").list(); } ...
(1) odpowiedzi
2017-02-03 23:02 PostgreSQL: 42883 Operator does not exist: timestamp without time zone = text »
I am using Npgsql 3.0.3.0 and PetaPoco latest version. When I run this command: var dateCreated = DateTime.Now; // just an example var sql = new Sq...
(2) odpowiedzi
2017-02-03 12:02 Django / PostgresQL jsonb (JSONField) - convert select and update into one query »
Versions: Django 1.10 and Postgres 9.6 I'm trying to modify a nested JSONField's key in place without a roundtrip to Python. Reason is to avoid race ...
(1) odpowiedzi
2017-02-03 07:02 Find occurance of string using generate_series »
Query : select id , DATASTRING from mixdatatable Output : id DATASTRING 1 131A131A- - <> <...
(3) odpowiedzi
2017-02-03 00:02 SQL join arbitrary information to form a mixed list »
I have a list of items of different Types with their respective ID. Items will be grouped together by a group ID: Type | ID | GroupID ------------...
(2) 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 17:02 Scanning results from DB query that contain a % character »
I'm reading data from a postgreSQL DB in my GO code, which works smoothly until I try to scan column values of type string containing the character %....
(2) odpowiedzi
2017-02-02 12:02 Is it possible to write right outer join where it would always be empty left part? »
Here is an example what I want. We have 2 tables - users and departments users: id name d_id 1 Alice 1 2 Bob 1 departments: id name 1 Sales 2...
(3) odpowiedzi
2017-02-02 10:02 PostgreSQL aggregate nodes recursively »
My table in postgres looks like below. Interpret those values in arrays as ID's of nodes that are connected in a directed graph. What I want to get is...
(1) odpowiedzi
2017-02-02 08:02 String Manipulation throws error while Inserting into PostgreSql Jsonb Column »
I have the following code, to insert data into my table res(ID bigserial, Results jsonb not null). I want to insert data so that 'Display' column a...
(1) odpowiedzi
2017-02-02 05:02 Postgres - Performance of large jsonb column »
We are using Postgres jsonb type in one of our DB tables. Table structure is shown as below: CREATE TABLE T ( id UUID NOT NULL PRIMARY KEY, paylo...
(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-02-01 22:02 Check PostgreSQL table column for value and return boolean »
I am just learning SQL and apologize if this is repetitive, but I have searched and not found an answer. Writing in python with a PostgreSQL DB. I wa...
(2) odpowiedzi
2017-02-01 21:02 Select objects inside array JSONB »
I am attempting to grab the objects within an array using JSONB in a Postgres db and Groovy. My Json is structured like this, stored in my database. ...
(1) odpowiedzi
2017-02-01 19:02 PostgreSql - Determining best Index on jsonb column »
I am pretty novice in the PostgreSql world. I store the following JSON objects in the jsonb column of PostgreSQL as one object per row. {"cid":"CID1"...
(0) odpowiedzi
2017-02-01 14:02 Should I store empty tsvector values or NULL values? »
When storing a tsvector value in a column, for records with no search terms, should I store an empty tsvector or a NULL value? Does it matter? Is th...
(0) odpowiedzi
2017-02-01 12:02 Pandas DataFrame from SQL query: difference in dates is wrongly displayed »
Given a table in Redshift (PostgreSQL) which contains one column, called created_at, its type is a timestamptz, looking like 2015-04-01 07:08:32.631+0...
(1) odpowiedzi
2017-02-01 11:02 Streaming data into complex Json in PostgreSql »
I have the following Json stored in the Jsonb column of PostgreSql. I have a requirement where I should be able to update the Json as and when the str...
(0) odpowiedzi
2017-01-31 20:01 How do I query the database after a Postgres exception? »
I'm having some trouble handling concurrency issues when inserting into a Postgres database. The model has a uniqueness constraint on an index column,...
(1) odpowiedzi