Data dodania Pytanie
2017-08-08 22:08 Using dynamic schema with postgres »
I have to decide how I want to implement dynamic schema. I will try to put some more description where my problem is. I use the postgres DB in lates...
(0) odpowiedzi
2017-08-08 21:08 How to get date: one month away from a specific date? »
I know that I can get the date from today such as select CURRENT_DATE - INTERVAL '1 months'; But what if I need the first date specified. Somet...
(2) odpowiedzi
2017-08-08 14:08 Combining SQL queries with shared logic »
I'm currently duplicating a rather large SQL aggregation query so that I can run it once to return the metrics for the entire data set, then again to ...
(2) odpowiedzi
2017-08-08 14:08 PostgreSQL Full Text Search Spanish character Ñ »
I am facing an issue when doing full text search with PostgreSQL on text that contains de Spanish character 'Ñ' When I try to tokenize the Spanish w...
(1) odpowiedzi
2017-08-08 10:08 How to select data from jsonb column? »
I have got one column with type jsonb. The data in this column looks as below { "random_number1": { "random_number2": { ...
(1) odpowiedzi
2017-08-07 17:08 Email confirmation in Flask fails »
The below code successfully generates a token and sends a link to the user's inbox for confirmation. But when the user clicks on it, Flask is not reco...
(1) odpowiedzi
2017-08-07 10:08 Sanitize user input with the USING keyword in PL/pgSQL »
This is how I create my search_term: IF char_length(search_term) > 0 THEN order_by := 'ts_rank_cd(textsearchable_index_col, to_tsquery...
(1) odpowiedzi
2017-08-07 07:08 Could not create target cluster during upgrade 9.5 to 9.6 »
I am on ubuntu 16.04, and install postgres 9.5 on it Then I to upgrade postgres 9.5 to 9.6, and I following postgresql offical download page to insta...
(0) odpowiedzi
2017-08-06 21:08 Postgres partitioning options right now? »
I have a task which would really benefit from implementing partitioned tables, but I am torn because Postgres 10 will be coming out relatively soon. ...
(1) odpowiedzi
2017-08-06 20:08 Redshift: Update or Insert each row in column with random data from another table »
update testdata.dataset1 set abcd = (select abc from dataset2 order by random() limit 1 ...
(1) odpowiedzi
2017-08-06 20:08 Unable to deploy rails app on Heroku. Postgresql not detected »
I have developed a rails app Todo List but when trying to deploy it on Heroku. I see the database needs to be changed to PostgreSQL. I tried with foll...
(0) odpowiedzi
2017-08-06 15:08 Database options available for storing 100GB of Key value pair kind data »
I am currently using SQL Server to store this data ,its normalized and indexed but performance is still poor if i perform some where operation on nume...
(2) odpowiedzi
2017-08-05 15:08 Trigger behaving strangely »
I'm making a Database that needs to store data for a school system and for certain activities minors need a permit. I have this trigger that checks th...
(1) odpowiedzi
2017-08-05 06:08 unable to get defination of an index psypg2 »
i need to recreate indexes on a table as i have to insert a lot of data into the table. i am trying to get the defination of an index in postgres usin...
(1) odpowiedzi
2017-08-05 04:08 SQL issue - type of fkey »
I'm using PostgreSQL What I need In SELECT query I need to select owner_type (client or domain). If solution does not exist please help me to rework...
(2) odpowiedzi
2017-08-05 00:08 Query for exact match of jsonb column in Rails 5 and PostgreSQL »
In my Rails 5 app with a Postgres database, I have a model Post with jsonb column called comments. The default value for comments is {}. I would lik...
(1) odpowiedzi
2017-08-04 20:08 Access a JSONB array of objects as an object of arrays »
I have a JSONB column in my Postgres 9.6 database with roughly the following structure [ { "A": "some value", "B": "another value", "fo...
(1) odpowiedzi
2017-08-04 18:08 Django won't use postgres schema properly »
I have a problem with using schema while running tests with django. All tables in my postgres database are in schema, let's name it 'schema'. In my se...
(0) odpowiedzi
2017-08-04 17:08 Populate random data from another table »
update dataset1.test set column4 = (select column1 from dataset2 order by random() limit 1 ...
(1) odpowiedzi
2017-08-04 05:08 How to select rows covering today's day and month in pg / Rails »
So I have this table called SeasonRate create_table "season_rates", force: :cascade do |t| t.string "title" t.datetime "from_date" t.datetime...
(1) odpowiedzi
2017-08-03 20:08 Rails/Postgres query all records created after 5 PM in taking into account daylight savings switch? »
I am looking to query for all records on a table with a created_at time of after 5 PM, EST WITH taking into account daylight savings. My DB is Postgr...
(2) odpowiedzi
2017-08-03 18:08 Why am I having this database issue? »
I am working on a Python/Django project, and we need to use two databases. Following the documentation I added a second database like this: DATABASE_...
(2) odpowiedzi
2017-08-03 15:08 How to destroy Postgres databases owned by other users in RDS using Terraform? »
I managed to nicely get Terraform creating databases and roles in an RDS Postgres database but due to the stripped down permissions of the rds_superus...
(0) odpowiedzi
2017-08-03 12:08 Postgres jsonb_set multiple nested fields »
I have DB table with a jsonb column that has an entity, with nested child entities. Let's say we have: SELECT jsonb_set('{"top": {"nested": {"leaf" :...
(1) odpowiedzi
2017-08-03 08:08 geometry matching and update »
I am trying to match geometries from two tables and update one table based on the match. But this is taking huge time. Table1 +-------------+------...
(1) odpowiedzi
2017-08-02 15:08 Postgres 8 support with Django 1.8 »
I am upgrading Django from 1.5 to 1.8. My production server is running postgres 8.4.20 but Django 1.8 says it dropped support for Postgres <= 9.0....
(0) odpowiedzi
2017-08-02 15:08 Django datatime field »
I'm reading the PostgreSQL documentation and I see that Postgres does not have a datatime data type but when I run ./manage.py sqlmigrate myapp 0001_i...
(1) odpowiedzi
2017-08-02 14:08 Postgres Multiple Joins »
Not an expert on SQL but I managed to get this query working and delivering the results I need. The trick is to get it performing. The two tables in q...
(1) odpowiedzi
2017-08-02 12:08 saving boolean values to postgres database using ruby on rails »
I've been working on a old rails project for a bit now. Since I haven't worked with rails in some time I'm a bit rusty and need some help along the wa...
(1) odpowiedzi
2017-08-02 10:08 How to call table function from another function in PostgreSQL? »
I am new to PostgreSQL. I have a function CREATE OR REPLACE FUNCTION func1 ( a_person_id integer) RETURNS TABLE (granted_group_id varchar(10)) AS $b...
(2) odpowiedzi
2017-08-01 23:08 SQL pairing adjacent rows »
Using postgreSQL (latest). I'm a total noob. I have a view that always gives me a table of an even number of rows- no duplicates (the letters are ana...
(1) odpowiedzi
2017-08-01 21:08 Group ranges in table with non-time-based start and end columns »
I need to find the ranges in consecutive data points that may have gaps between them based on double precision start and end columns. For simplicity...
(1) odpowiedzi
2017-08-01 10:08 How to set Ignore Duplicate Key in Postgresql while table creation itself »
I am creating a table in Postgresql 9.5 where id is the primary key. While inserting rows in the table if anyone tries to insert duplicate id, i want ...
(1) odpowiedzi
2017-08-01 09:08 Not able to create Collation on windows »
Hi I am trying to create collation on Windows but not able to create it, I getting error as shown in screenshot. I am using deafult POSIX collati...
(1) odpowiedzi
2017-08-01 07:08 How to use join with aggregate function in postgresql? »
I have 4 tables Table1 id | name 1 | A 2 | B Table2 id | name1 1 | C 2 | D Table3 id | name2 1 | E 2 ...
(1) odpowiedzi