Re: [GENERAL] Inserting boolean types as an alias?

2013-12-03 Thread Michal Politowski
On Mon, 2 Dec 2013 15:46:17 -0800, Nick wrote: [...] This is what I have currently for the line that I am specifically talking about: INSERT INTO club_Games(memberID, gameID, hardwareID, count, status) VALUES ((SELECT memberID FROM members WHERE name = 'Fred Flinstone'), (SELECT

Re: [GENERAL] Deleting 173000 records takes forever, blocks async queries for unrelated records

2013-02-01 Thread Michal Politowski
On Fri, 1 Feb 2013 10:38:26 +0100, Alexander Farber wrote: Hello, in a Facebook game running on PostgreSQL 8.4.13 and having so many players: # select count(*) from pref_users; count 223964 I am trying to get rid of inactive users, who just visited the canvas page, but

Re: [GENERAL] Mixed up protocol packets in server response?

2011-06-03 Thread Michal Politowski
On Thu, 2 Jun 2011 08:50:30 +0800, Craig Ringer wrote: On 1/06/2011 9:06 PM, Michal Politowski wrote: What may be the cause of this weird problem? Is it some known or unknown bug in 8.3.4 or is the application/Java side more suspected? It'd be really helpful if you could collect

Re: [GENERAL] Mixed up protocol packets in server response?

2011-06-03 Thread Michal Politowski
On Fri, 3 Jun 2011 09:53:59 -0400, Tom Lane wrote: [...] You'd probably be better off asking these questions in pgsql-jdbc ... a lot of us here don't even speak Java. Good point. Will try the other list. Thank you for your help. -- MichaƂ Politowski Talking has been known to lead to

[GENERAL] Mixed up protocol packets in server response?

2011-06-01 Thread Michal Politowski
I have an instance of what looks like a weird mixup of data returned by the server. This is observed in a Java application using the 9.0-801.jdbc4 JDBC driver connecting to an 8.3.4 server (yes, it's old) running on Solaris. The application hung waiting for the result of one select * from

Re: [GENERAL] index in desc order

2010-11-02 Thread Michal Politowski
On Tue, 2 Nov 2010 10:10:19 -0400, Tom Lane wrote: Szymon Guz mabew...@gmail.com writes: On 2 November 2010 10:36, AI Rumman rumman...@gmail.com wrote: Is it possible to create an index in descending order? create index i on t(i desc); Note that there is actually no point at all in

[GENERAL] Why would a scan take so long?

2010-10-01 Thread Michal Politowski
a couple minutes and it takes ten times longer: Time: 1495549.716 ms What am I missing? -- Michal Politowski -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Best way to store case-insensitive data?

2010-06-11 Thread Michal Politowski
On Thu, 10 Jun 2010 13:50:23 -0700, Mike Christensen wrote: I have a column called email that users login with, thus I need to be able to lookup email very quickly. The problem is, emails are case-insensitive. I want f...@bar.com to be able to login with f...@bar.com as well. There's two

Re: [GENERAL] SELECT only those values of table B which have a value in table A

2010-02-25 Thread Michal Politowski
On Thu, 25 Feb 2010 09:34:19 +0100, Stefan Schwarzer wrote: Hi there, I have tables with values for each country of the world. Now, there is the possibility for the user to generate regional (Europe, Africa...) or subregional (Western Europe, Central Europe...) aggregations on-the-fly. In

Re: [GENERAL] (P)SQL for a sum with constraints

2009-04-16 Thread Michal Politowski
On Wed, 15 Apr 2009 15:32:42 +0100, Shug Boabby wrote: I simplified my problem a little too much and now I'm stuck trying to use cumulative_sum(). My schema is not only A, B but also has a C A B C 1 0 1 2 1 1 3 0 1 4 2 1 5 1 1 1 0 2 2 1 2 3 0 2 4 2 2 5 1 2 and I want to be able

Re: [GENERAL] partial unique index and the planner

2009-02-16 Thread Michal Politowski
On Sun, 15 Feb 2009 13:41:05 -0500, Tom Lane t...@sss.pgh.pa.us wrote: Michal Politowski mpol...@meep.pl writes: Is it normal that plans using a scan on a partial unique index estimate that much more than one row is returned? There isn't currently any special logic to recognize that case

[GENERAL] partial unique index and the planner

2009-02-15 Thread Michal Politowski
I'm using PostgreSQL 8.3. Is it normal that plans using a scan on a partial unique index estimate that much more than one row is returned? Eg. I see: - Bitmap Index Scan on tmp_idx_oss_archive_object_id_current (cost=0.00..3.12 rows=4189 width=0) where the tmp_idx_oss_archive_object_id_current