Data dodania Pytanie
2017-04-21 14:04 Detect specific string including wildcards and isolate wildcards in PLPGSQL »
Is it possible in PostgreSQL 9.4 (PLPGSQL) to detect if a string contains a certain string including wildcards and get the wildcards, ex.: IF NEW.my_...
(1) odpowiedzi
2017-04-20 22:04 GROUPing extracting first and last row »
I have the following "starting" query: select fecha as date,velocidad as speed, velocidad>100 as overspeed from reports.avl_historico_35489804663...
(3) odpowiedzi
2017-04-20 17:04 array_agg with distinct works in postgres 9.4 but not in postgres 9.6 »
I have a query that use array_agg with distinct as an argument and is not accepted on postgres 9.6. I created this sample to illustrate the issue: c...
(2) odpowiedzi
2017-04-20 14:04 Search in jsonb and array combination in postgres with rails4 stored_accessor »
I have a model called Event, where I have stored_accessor "list" (stored like data: {"list"=>[{"key"=>"key1", "value"=>"value1"}]}). I need...
(1) odpowiedzi
2017-04-19 16:04 Select only the rows with the latest date in postgres »
I have data in a table set up as follows with date stored as date type. I only wanted the latest date for each row (house) the number of entries per h...
(3) odpowiedzi
2017-04-19 09:04 How to fetch data based on multiple key pair in Postgresql + Rails4 »
I have a table XYZ which has few columns in which, I need to filter out resultset based on Two columns (col1, col2) requested params Request params l...
(1) odpowiedzi
2017-04-18 14:04 How to import BLOB formatted as CSV to postgres »
I have a csv file that is an output from a BLOB store. The csv contains 6 related tables. Not all records utilise the 6 tables but all records do use ...
(1) odpowiedzi
2017-04-17 08:04 Insert, update or alter column in postgres when working with to_char »
What i have; 3 tables in postgres 9.4. Table 1 is the main table tables 2 and 3 contain some additional data (an update multiplier) which is quarterl...
(1) odpowiedzi
2017-04-16 19:04 Postgres quarter function »
When running select to_char ("dateoftransfer", '"Q"quarter YYYY') as quarterly FROM table; I get back Q3uarter 2001 but expect Q3 2001 "dateoftran...
(1) odpowiedzi
2017-04-16 12:04 PostgreSQL Loop jsonb rows in 2 recordsets and find change »
I am a novice in PostgreSQL world, and not aware about its offerings much. I have a requirement where I have to find changes in values in 2 recordsets...
(0) odpowiedzi
2017-04-12 13:04 How to read multiple refcursor return by other procedure to another procedure »
i'm having one procedure which returns setof cursors Now i have to call that procedure to another procedure and access the data that return by that p...
(1) odpowiedzi
2017-04-11 16:04 Query Optimization for the below one: »
I am running this query which fetches close to 100 records. But it is taking nearly 10 mins to accomplish this. Can someone help me in optimizing it i...
(0) odpowiedzi
2017-04-10 20:04 Row-based security in Postgresql 9.4 based on views for read and write access »
For a system, where the users have full shell access, we want to manage the folders shared between the users via access control lists, using an postgr...
(0) odpowiedzi
2017-04-10 10:04 Insert Data in specified column if column value id matches the description of the ID in another table (normalized form) »
In order to do this (in Title Description) it's obvious that it's already a normalized database so an inner join kind of check will be used for sure. ...
(2) odpowiedzi
2017-04-10 00:04 Postgresql crosstab query with multiple "row name" columns »
I have a table that is a "tall skinny" fact table: CREATE TABLE facts( eff_date timestamp NOT NULL, update_date timestamp NOT NULL, symbo...
(1) odpowiedzi
2017-04-07 16:04 Laravel 5 configure timezone not define the timezone at postgres connection »
I have a question: How you usually work on timezone in the sites with laravel 5? Postgres is in localtime and the local timezone of my notebook is in...
(2) odpowiedzi
2017-04-07 14:04 Invalid status code : 0 in node.js API »
I am building a simple api in node and express with postgre as Db following a tutorial.I am still learning and new to this tech.I followed everything ...
(1) odpowiedzi
2017-04-07 12:04 how to do update data in 1 table from another table using with clause,select,storing language id's in json_array and join in postgresql »
if EXISTS (SELECT 1 FROM lt_transmap_patient_language l left join lt_transmas_patient p on p.patient_id=l.patient_language_pat...
(0) odpowiedzi
2017-04-06 19:04 Hibernate 5.2.9:@Basic(fetch = FetchType.LAZY) is not working »
I saw there are lot of questions asked earlier on the same thing in stack overflow in different ways. I looked at one of this issue on Hibernate forum...
(1) odpowiedzi
2017-04-06 14:04 dblink_build_sql_delete . I need to be able to delete the data with <= condition »
SELECT xyz.* FROM PUBLIC.DBLINK ('dbname=LiveDB port=5432 host=127.0.0.1 user=postgres password=root','SELECT dblink_build_sql_delete(''"folderstatus...
(1) odpowiedzi
2017-04-06 14:04 Postgresql's json_each()/jsonb_each() equivalent in MySQL 5.7.*? »
Is there any json_each()/jsonb_each() equivalent in MySQL 5.7.*? According to the article I found: "Not supported, cannot be implemented using UDFs o...
(0) odpowiedzi
2017-04-05 20:04 how does ordering by UUID works on postgresql? »
Is there any ordering guarantee on using uuid_generate_v1() on postgresql? If yes, The guarantees are per machine or it does not matter on which mach...
(1) odpowiedzi
2017-04-04 01:04 Get the last line for a specific variable »
I am applying a windows function similar to the query on the example below. I would like to know how can I extract only the last row for each depname....
(0) odpowiedzi
2017-04-02 22:04 Postgresql Updating Modified_on (Default Time stamp) column without a Trigger »
How can I update the Modified_on column which is defined as DEFAULT TIMESTAMP without the use of a Trigger in Postgresql. ...
(0) odpowiedzi
2017-04-02 14:04 Merging records in a table with 2-columns primary key »
I have prepared a simple test case for my question - In a game player ids and names are stored in the table users: CREATE TABLE users ( uid ...
(1) odpowiedzi
2017-03-30 14:03 pgpool is doing failover even when only one node of pgpool not able to reach postgresql master »
We have a PostgreSQL setup with 2 nodes master slave PostgreSQL and 3 node pgpool cluster. The cluster works and does failover in normal scenarios. N...
(0) odpowiedzi
2017-03-28 19:03 How to create tables with millions of rows with fast performance in PostgreSQL? »
I have data that correspond to 400 millions of rows in a table and it will certainly keep increasing, I would like to know what can I do to have such ...
(1) odpowiedzi
2017-03-28 01:03 Differentiate null and empty in Postgres JOIN query »
If I have tables like this: t1: id | name ----+------ 1 | a 2 | b 3 | c 4 | d t2: id | value ----+------- 10 | xxx 20 | yyy 30 | zzz ...
(1) odpowiedzi
2017-03-27 08:03 How to detect the database is backup mode or not in postgresql 9.4 »
Currently we scheduled backup job at morning by using pg_basebackup. Is it possible to detect a database mode during backup time. ...
(1) odpowiedzi
2017-03-26 21:03 How to JOIN using LIKE '<column>%' »
I have a list of items, each of which has a category code: id | name | category_code ---+------------+-------------- 11 | 'Cookies' | '43040' ...
(1) odpowiedzi
2017-03-24 09:03 Infinity recursive function exception in Postgresql »
I have a table Answer and Many to Many table Link (Answer n-n Answer) Link have 2 column : from_id and to_id reference to answer_id. I want get all d...
(1) odpowiedzi
2017-03-23 14:03 Postgres Query giving ERROR: invalid input syntax for integer: "" »
I am trying to execute following query but failing to get the result in postgres My query is SELECT BP.BULLETIN_NUM,BP.REV_ID FROM cct.CCTT_BULLETI...
(0) odpowiedzi
2017-03-23 13:03 POSTGRES: String is being cast as unknown »
I have 2 functions: First: CREATE OR REPLACE FUNCTION parking_main_analysis(park_id_p text, zone_parameter integer, org_id integer, number_of_days i...
(0) odpowiedzi
2017-03-22 18:03 How to convert english date to nepali date using SQL any help would be appreciated »
How to convert english date to nepali date using SQL any help would be appreciated. example: Year Month Day English Date 2017 ...
(0) odpowiedzi
2017-03-21 15:03 Pass dynamic parameter to crosstab subquery »
I have table like there: table: | id | key | label | amount | |----|------|--------|--------| | 1 | 1 | label1 | 10 | | 2 | 1 | la...
(1) odpowiedzi