Re: [GENERAL] Parameter for query

2013-07-17 Thread Luca Ferrari
On Wed, Jul 17, 2013 at 6:25 AM, Robert James srobertja...@gmail.com wrote: Is there any way to set a variable or parameter for a query? I have a long query where a certain variable needs to be easy to change. I'd like to do something like: threshold = 10.3 SELECT... WHERE x

Re: [GENERAL] Driver Question

2013-07-17 Thread Luca Ferrari
On Tue, Jul 16, 2013 at 5:36 PM, Corbett, James james.corb...@cra-arc.gc.ca wrote: Hello all: My first official message so please be gentle with me. I’m attempting to make a new JDBC Connection Profile via my Eclipse IDE. Apparently it’s looking for the following jar in the driver wizard:

Re: [GENERAL]

2013-07-17 Thread ERR ORR
- Is your postgres server actually up and running? - Did you add localhost to the addresses served by postgres in pg_hba.conf (with proper permissions)? - Have you considered upgrading your postgres installation to a current version? 8.0.0-rc1 is WAY obsolete. On 23 March 2013 15:13, News

[GENERAL] Question re contribs of Julian Assange

2013-07-17 Thread ERR ORR
I noticed on the postgresql website that a certain *Julian Assange* is mentioned among the contributors to Postgresql. Out of curiosity, could anybody post in short what exactly he contributed to the DB? Thanks, RD

Re: [GENERAL] Question re contribs of Julian Assange

2013-07-17 Thread Magnus Hagander
On Wed, Jul 17, 2013 at 9:15 AM, ERR ORR rd0...@gmail.com wrote: I noticed on the postgresql website that a certain Julian Assange is mentioned among the contributors to Postgresql. Out of curiosity, could anybody post in short what exactly he contributed to the DB? You can find a list of

Re: [GENERAL] Question re contribs of Julian Assange

2013-07-17 Thread Luca Ferrari
On Wed, Jul 17, 2013 at 10:15 AM, ERR ORR rd0...@gmail.com wrote: I noticed on the postgresql website that a certain Julian Assange is mentioned among the contributors to Postgresql. Out of curiosity, could anybody post in short what exactly he contributed to the DB?

Re: [GENERAL] V8.4 TOAST table problem

2013-07-17 Thread David Welton
Hi, I'm talking about our own massively bloated toast table - described in an earlier post - that I think I can replicate. I didn't mean to steal your thread, but the problem seems very similar, and we're using 9.1. I don't know a lot about Postgres internals, but to me it smells like a bug of

Re: [GENERAL] transactional swap of tables

2013-07-17 Thread Vincenzo Romano
I have done the following test pn v9.2.4 with two concurrent sessions: -- session no.1 tmp1=# create table t1 ( t text ); CREATE TABLE Tempo: 37,351 ms tmp1=# create table t2 ( t text ); CREATE TABLE Tempo: 33,363 ms tmp1=# create or replace function f1( out tx text ) tmp1-# language plpgsql

Re: [GENERAL] Build RPM from Postgres Source

2013-07-17 Thread Devrim GÜNDÜZ
Hi, On Fri, 2013-07-12 at 14:37 -0700, ktewari1 wrote: Hi, I need to have some different settings(like NAMEDATALEN etc.) and that's why I'm trying to build postgres from the source and to create an rpm to be send for install. Now, the build works fine but, I don't see a way to

Re: [GENERAL] Upgrading from Pg 9.1 to 9.2

2013-07-17 Thread Muhammad Bashir Al-Noimi
On Tue, Jul 16, 2013 at 11:52 PM, salah jubeh s_ju...@yahoo.com wrote: Also have a look here http://wiki.postgresql.org/wiki/Using_pg_upgrade_on_Ubuntu/Debian Thanks a lot, I could successfully upgrade my server -- Best Regards Muhammad Bashir Al-Noimi -- Sent via pgsql-general mailing

[GENERAL] pgAdmin for ubuntu

2013-07-17 Thread Muhammad Bashir Al-Noimi
Howdy, After upgrading my Pg from 9.1 to 9.2 the avaliable pgAdmin in ubuntu 21.10 reporotiy can't deal with Pg 9.2. How can I get recent pgAdmin version for ubuntu 12.10? P.S. - I tried ppa:pitti/postgresql but it doesn’t contain on suitable pgAdmin version for Pg 9.2 - I don’t prefer to build

Re: [GENERAL] pgAdmin for ubuntu

2013-07-17 Thread Vincenzo Romano
2013/7/17 Muhammad Bashir Al-Noimi mbno...@gmail.com: Howdy, After upgrading my Pg from 9.1 to 9.2 the avaliable pgAdmin in ubuntu 21.10 reporotiy can't deal with Pg 9.2. How can I get recent pgAdmin version for ubuntu 12.10? P.S. - I tried ppa:pitti/postgresql but it doesn’t contain on

Re: [GENERAL] Build RPM from Postgres Source

2013-07-17 Thread Michael Paquier
On Wed, Jul 17, 2013 at 9:28 PM, Devrim GÜNDÜZ dev...@gunduz.org wrote: Hi, On Fri, 2013-07-12 at 14:37 -0700, ktewari1 wrote: Hi, I need to have some different settings(like NAMEDATALEN etc.) and that's why I'm trying to build postgres from the source and to create an rpm to be send

Re: [GENERAL] pgAdmin for ubuntu

2013-07-17 Thread Vincenzo Romano
2013/7/17 Muhammad Bashir Al-Noimi mbno...@gmail.com: On Wed, Jul 17, 2013 at 3:34 PM, Vincenzo Romano vincenzo.rom...@notorand.it wrote: Once you sudo add-apt-repository ppa:pitti/postgresql then you go in /etc/apt/sources.list.d/pitti* and you replace the word with your Ubuntu version with

Re: [GENERAL] pgAdmin for ubuntu

2013-07-17 Thread Muhammad Bashir Al-Noimi
On Wed, Jul 17, 2013 at 3:34 PM, Vincenzo Romano vincenzo.rom...@notorand.it wrote: Once you sudo add-apt-repository ppa:pitti/postgresql then you go in /etc/apt/sources.list.d/pitti* and you replace the word with your Ubuntu version with precise. By doing so you'll install that version into

Re: [GENERAL] pgAdmin for ubuntu

2013-07-17 Thread Muhammad Bashir Al-Noimi
On Wed, Jul 17, 2013 at 4:10 PM, Vincenzo Romano vincenzo.rom...@notorand.it wrote: Did you run apt-get update once you did che change? sure yes. -- Best Regards Muhammad Bashir Al-Noimi -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] Query plan different depending on the value of where filter

2013-07-17 Thread Looby, Denis
Hi All, I have an interesting query scenario I'm trying to understand. I came across this while investigating a slow query in our application. I've been able to reproduce the scenario in a psql script that sets up the tables and runs the queries. Script here http://pastebin.com/CBkdDmWp if

Re: [GENERAL] Query plan different depending on the value of where filter

2013-07-17 Thread Tom Lane
Looby, Denis denis.lo...@hp.com writes: What I don't understand is why the plan is different just because the group_id = has changed value? Does the planner have some statistical info on the contents of non-indexed rows? Of course. In this case it knows that a nestloop would be a loser

[GENERAL] What are my options to avoid a Row Exclusive/RowShareLock conflict / is there a better way?

2013-07-17 Thread rox
I have a long running stored procedure that pulls data from 2-3 tables, updates columns in a row in the IMPORT_STATUS table, creates a couple of temp tables, and then deletes/inserts/updates back into 3-4 tables... but never once does anything directly with the USER table. The long running

[GENERAL] dynamic table names

2013-07-17 Thread John Smith
guys, have to use legacy 8.1. i have 100,000 tables in a schema that need to be queried (optimizing this by combining them into one will have to wait). so my query goes like so: execute 'select * from ' || tabname::regclass || ' where firstname = john' into e; but i am getting an error:

Re: [GENERAL] dynamic table names

2013-07-17 Thread Rob Sargent
On 07/17/2013 02:39 PM, John Smith wrote: guys, have to use legacy 8.1. i have 100,000 tables in a schema that need to be queried (optimizing this by combining them into one will have to wait). so my query goes like so: execute 'select * from ' || tabname::regclass || ' where firstname =

Re: [GENERAL] dynamic table names

2013-07-17 Thread Rob Sargent
On 07/17/2013 02:39 PM, John Smith wrote: guys, have to use legacy 8.1. i have 100,000 tables in a schema that need to be queried (optimizing this by combining them into one will have to wait). so my query goes like so: execute 'select * from ' || tabname::regclass || ' where firstname =

Re: [GENERAL] dynamic table names

2013-07-17 Thread David Johnston
John Smith-54 wrote guys, have to use legacy 8.1. i have 100,000 tables in a schema that need to be queried (optimizing this by combining them into one will have to wait). so my query goes like so: execute 'select * from ' || tabname::regclass || ' where firstname = john' into e;

Re: [GENERAL] dynamic table names

2013-07-17 Thread Thomas Kellerer
John Smith wrote on 17.07.2013 22:39: guys, have to use legacy 8.1. i have 100,000 tables in a schema that need to be queried (optimizing this by combining them into one will have to wait). so my query goes like so: execute 'select * from ' || tabname::regclass || ' where firstname =

[GENERAL] About postgres scale out

2013-07-17 Thread Xiang Jun Wu
Hello, I'd like to ask a common question about scale out for postgres. Our current data volume is about 500GB ~ 1TB in one pg cluster(postgres 9.2). We've set up master/slave replication to keep sync. To reach better performance from apps side, we want to use pgbounder like app to split

Re: [GENERAL] About postgres scale out

2013-07-17 Thread David Kerr
On Wed, Jul 17, 2013 at 03:10:37PM +0800, Xiang Jun Wu wrote: - Hello, - - I'd like to ask a common question about scale out for postgres. - - Our current data volume is about 500GB ~ 1TB in one pg cluster(postgres 9.2). We've set up master/slave replication to keep sync. - To reach better

Re: [GENERAL] dynamic table names

2013-07-17 Thread John Smith
david, you're right. i didn't realize it had to be executed inside a function so now i'm trying this: -- create function create or replace function get_tables(sname varchar) returns record as $$ select tablename from pg_tables where schemaname = $1; $$ language 'plpgsql'; -- query tables

Re: [GENERAL] dynamic table names

2013-07-17 Thread David Johnston
John Smith-54 wrote any help? Sorry. Its hard enough teaching people via e-mail let alone teaching them on an unsupported version of PostgreSQL that has reduced functionality with respect to function writing compared to the more recent versions. You are going to need to some kind of FOR loop

Re: [GENERAL] Update big table

2013-07-17 Thread Haiming Zhang
Thanks. I have fixed the problem. And now the query can run in 4 mins for 1.5 million records in TABLE1 and 0.5 million records in TABLE2. The solution is I created a function that gets all event_id from TABLE2 then travel through each event_id and do the update for TABLE1. This removes the