Data dodania Pytanie
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
2017-01-24 15:01 Remove n elements from array using start and end index »
I have the following table in a Postgres database: CREATE TABLE test( id SERIAL NOT NULL, arr int[] NOT NULL ) And the array contains about 500...
(2) odpowiedzi
2017-01-24 11:01 direct update vs check for changes before update »
I am using Symfony 3 and doctrine 2 in my current projet. When you perform a post request to update a row, doctrine fetches it, updates the entity b...
(0) odpowiedzi
2017-01-21 19:01 Accessing raster column of a table via psycopg2 »
I have a table in PostGIS with several rasters, which have the same spatial reference, but the tiffs are from different dates. Now I am trying to acce...
(1) odpowiedzi
2017-01-21 08:01 How to loop through string[] in postgresql? »
In this postgressql function i created a array by spliting a string. Now i want loop on this array and do some processing on it. Function: CREATE OR...
(2) odpowiedzi
2017-01-21 05:01 psql: could not connect to server on Linux »
I installed PostgreSQL on Linux, how is indicated in Debian Wiki After installation I run the following commands: # su - postgres $ psql And I go...
(0) odpowiedzi
2017-01-16 10:01 Creating TEMP TABLE dynamically in Postgresql and selecting the same table in FOR loop. But getting the error near PIPE symbol »
do $xyz$ declare y text; i record; begin y := to_char(current_timestamp, 'YYYYMMDDHHMMSS'); raise notice '%',y; execute 'CREATE TEMP TABLE someNewTabl...
(1) odpowiedzi
2017-01-13 13:01 How to fetch the ids in a column where multiple columns are repeated »
I have a table like the next: TABLE 1 ------- ID Integer COLUMN_1 Text COLUMN_2 Text COLUMN_3 Integer How could I fetch the ids in...
(3) odpowiedzi
2017-01-11 13:01 symfony create database index with lower function »
How can I declare in Doctrine an index for postgresql like: CREATE INDEX index_name_city_hotel ON booking_hotels(lower(name) text_pattern_ops, city_ho...
(0) odpowiedzi
2017-01-10 20:01 Generate 2d array with given values »
I'm trying to turn a 1d jsonb array [1, 2] into 2d array where its elements are repeated 3 times (the result can be in jsonb) [[1, 1, 1], [2, 2,...
(1) odpowiedzi
2017-01-09 12:01 How to get data from 2 tables based on search keyword rails »
I have 2 tables schools and private_schools and they are not related to each other. What I need to do is to search the data from both tables to popula...
(3) odpowiedzi
2017-01-08 20:01 Postgresql stores timezone information in TIMESTAMP WITH TIMEZONE? »
I'm trying to understand how PostgreSQL handles TIMESTAMP WITH TIMEZONE type, and I 'm running into the discrepancy between theory and practice. Acco...
(1) odpowiedzi
2017-01-06 19:01 I want to get an array of users whose last name begins with 'x' using the Rails console »
I have tried such things as: users=User.where :conditions => "last_name LIKE ?" "%X" and users=User.where("last_name.each_char.first = 'X'") and u...
(1) odpowiedzi
2017-01-04 07:01 How to sum all columns value of a table and display the total in new row by using Postgresql »
I am using normal select query to display all rows SELECT type, debit, credit, (debit-credit) as balance from bank_cash_registers ...
(2) odpowiedzi
2017-01-03 08:01 How to install Secondary Postgres Plus server on same Linux machine »
I already have a primary Postgres server installed in /opt/PostgresPlus . Now i'm trying to install a secondary server on same linux machine using ppa...
(0) odpowiedzi
2016-12-31 03:12 PostgreSQL 9.4: Concatenate column values of two distinct rows into one single row with that column »
I have three tables: 1) Politics CREATE TABLE politics ( "idPolitician" integer NOT NULL, "publicName" character varying(150) NOT NULL, "completeNam...
(0) odpowiedzi
2016-12-30 08:12 Getting the list of Objects and the corresponding value in Postgres (JSON data) »
I have the following JSON data which has an array of Objects PRODUCTION -> KBM -> (array of Objects) What I am looking for is to get all the values f...
(1) odpowiedzi
2016-12-30 08:12 C# Clear Biometric logs after logging into postgresql database without any loss of data »
I have developed a windows service which will log all the bio-metric logs. For this to run, i have used npgsql for postgres connectivity. The below co...
(0) odpowiedzi
2016-12-29 08:12 In postgresql how to change the value in jsonb type cloumn? »
Now I want to use postgresql function to change the jsonb type cloumn's value,now I have a function achieve the type json CREATE OR REPLACE FUNCTION...
(1) odpowiedzi
2016-12-28 16:12 SQL Server's SET NOCOUNT ON Postgresql equivalent »
I've to help migrating a SQL Server 2008 database to a PostgreSQL 9.4.10 one. The original querys have SET NOCOUNT ON and SET NOCOUNT OFF several time...
(0) odpowiedzi
2016-12-27 17:12 query that shows if the tables might need analyze and vacuum »
i have this doubt I loking for a query that returns if my tables from given schema need analyze and vacuum before wraparound wich can not happen, so ...
(0) odpowiedzi
2016-12-22 16:12 Generate serie with prefix and leading zeros (postgresql) »
I am trying to generate a serie that contains both prefix ('A') and leading zeros. SELECT * FROM generate_series(8,12) will generate a serie 8 9 1...
(2) odpowiedzi
2016-12-22 10:12 No LazyInitializationException in controller »
On my project I'm using Spring Boot with Hibernate 5 and Postgresql 9.4. Now I'm facing a problem. I've got a @OneToMany relationship with LAZY fetchi...
(0) odpowiedzi
2016-12-21 15:12 Substring from an escape character onwards »
I'm using PostgreSQL and I need to truncate a text string, I need to show from an escape character (:) onwards. I'm trying something like that: SE...
(2) odpowiedzi
2016-12-21 11:12 Error trying to run pgAdmin4 »
I've installed postgresql 9.6 (using suggested linux installer) which comes with pgAdmin4, but getting a few errors. First, I had to change the folde...
(1) odpowiedzi
2016-12-21 11:12 Postgres Match All array values to same column with and condition »
I have table table_a with following columns id event_id 1 101 1 102 1 103 2 105 2 103 2 106 I want to search (101, 103) with and condi...
(1) odpowiedzi
2016-12-19 20:12 Apache Drill with Postgres jdbc connection password issue »
When password parameter contains "#"s - authentication fails. If I change the password to just [0-9a-Z] - it works great. Can I somehow char escape i...
(0) odpowiedzi