Re: [GENERAL] pgfoundry.org is not accessible

2011-09-01 Thread Magnus Hagander
Yeah, all hub.org hosted services had a rather long downtime again yesterday. They seem to be back up now. /Magnus On Sep 2, 2011 1:25 AM, "Raghavendra" wrote: > Now am able to access it. But for sometime I was not able to access it. > > --- > Regards, > Raghavendra > EnterpriseDB Corporation >

[GENERAL] How can I merge two tables?

2011-09-01 Thread Jerry LeVan
Hi, I have tables on my various computers that looks like: Table "public.registrations" Column | Type | Modifiers | Storage | Description --+--+---+--+- software | text | | extended | id | text | | extended |

Re: [GENERAL] Memory leak somewhere at PQconnectdb?

2011-09-01 Thread Tom Lane
Craig Ringer writes: > Even better, add a valgrind suppressions file for the warnings and > ignore them. They are "leaks" only in the sense that a static variable > is a leak, ie not at all. Yeah, the bottom line here is that valgrind will warn about many things that are not genuine problems. Yo

Re: [GENERAL] UPDATE using query; per-row function calling problem

2011-09-01 Thread Tom Lane
Rory Campbell-Lange writes: > I'm doing an UPDATE something like this: > UPDATE > slots > SET > a = 'a' > ,b = (SELECT uuid_generate_v1()) > WHERE > c = TRUE; > Each updated row in slots is getting the same value for b. That's Postgres' interpretation

[GENERAL] pgAdmin3 not working with Gnome3

2011-09-01 Thread Mike Christensen
Hi all - I'm on openSuse running the latest stable release of Gnome3 (Just trying it out, so far the fact I can't minimize windows is perhaps more than my old school brain can handle).. I've noticed in pgAdmin, basically no popup works. If I right click on the "Databases" branch and select "New

Re: [GENERAL] pgAdmin3 not working with Gnome3

2011-09-01 Thread Mike Christensen
> Hi all - > > I'm on openSuse running the latest stable release of Gnome3 (Just > trying it out, so far the fact I can't minimize windows is perhaps > more than my old school brain can handle).. > > I've noticed in pgAdmin, basically no popup works.  If I right click > on the "Databases" branch an

Re: [GENERAL] How can I merge two tables?

2011-09-01 Thread Ondrej Ivanič
Hi, On 2 September 2011 03:09, Jerry LeVan wrote: > I keep registration numbers for software and login/passwords for > various organizations, etc… > > As time goes by the tables on the various computers get out of > sync. > > Is there an elegant way I can get all of the differences (uniquely) I

Re: [GENERAL] How can I merge two tables?

2011-09-01 Thread Diego Augusto Molina
Mmm... maybe if you can dump them as inserts you'll be able to restore them in one DB only. Important: make the restore connection autocommit (i.e. don't put the --single-transaction flag). That way individual INSERTs will fail without affecting the other data if that INSERT violates the PK. This i

Re: [GENERAL] Memory leak somewhere at PQconnectdb?

2011-09-01 Thread Craig Ringer
On 01/09/11 22:08, Antonio Vieiro wrote: > Hi all, > > I'm running one of my programs with valgrind to check for memory leaks > and I'm seeing something like this: You only get the one report, though, right? No matter how many times PQconnectdb is run in a loop? It's internal stuff within OpenSS

Re: [GENERAL] Why schema of table is removed from explain?

2011-09-01 Thread Tom Lane
hubert depesz lubaczewski writes: > On Thu, Sep 01, 2011 at 04:24:59PM -0400, Tom Lane wrote: >> The non-plain-text output formats provide that sort of detail, if you >> need it. > Which is great, but why can't we have it in plain text too? It's frequently unnecessary, and horizontal space is pr

[GENERAL] pgfoundry.org is not accessible

2011-09-01 Thread Raghavendra
Hi All, Am unable to access pgfoundry.org site. Does anyone facing the same problem ? Oops! Google Chrome could not connect to pgfoundry.org Try reloading: pgfoundry.­org Additional suggestions: - Access a **cached copy

Re: [GENERAL] Why schema of table is removed from explain?

2011-09-01 Thread Tom Lane
hubert depesz lubaczewski writes: > $ explain select * from x.y limit 1; > QUERY PLAN > > Limit (cost=0.00..0.04 rows=1 width=189) >-> Seq Scan on y (cost=0.00..13.70 rows=370 wid

Re: [GENERAL] Why schema of table is removed from explain?

2011-09-01 Thread hubert depesz lubaczewski
On Thu, Sep 01, 2011 at 04:24:59PM -0400, Tom Lane wrote: > hubert depesz lubaczewski writes: > > $ explain select * from x.y limit 1; > > QUERY PLAN > > > > Limit (cost=0.00..0.04 rows

Re: [GENERAL] Why schema of table is removed from explain?

2011-09-01 Thread hubert depesz lubaczewski
On Thu, Sep 01, 2011 at 04:39:06PM -0400, Tom Lane wrote: > hubert depesz lubaczewski writes: > > On Thu, Sep 01, 2011 at 04:24:59PM -0400, Tom Lane wrote: > >> The non-plain-text output formats provide that sort of detail, if you > >> need it. > > > Which is great, but why can't we have it in pl

Re: [GENERAL] pg_upgrade from 8.3.4 issue

2011-09-01 Thread Bruce Momjian
FYI, also, yesterday, I fixed a pg_upgrade bug when upgrading from 8.3 --- I suggest you wait for 9.0.5 or pull git head for the release you want. --- Tom Lane wrote: > I wrote: > > I think it'd be a lot safer to modify (or

Re: [GENERAL] How to get around this limitation (ALTER DATABASE db SET search_path = ...)

2011-09-01 Thread Scott Marlowe
On Thu, Sep 1, 2011 at 1:24 PM, David Johnston wrote: > Hi, > > > > From the documentation: > > “Whenever a new session is subsequently started in that database, the > specified value becomes the session default value.” > > Is there some way to get existing sessions to see the new search_path > wi

[GENERAL] UPDATE using query; per-row function calling problem

2011-09-01 Thread Rory Campbell-Lange
I'm doing an UPDATE something like this: UPDATE slots SET a = 'a' ,b = (SELECT uuid_generate_v1()) WHERE c = TRUE; Each updated row in slots is getting the same value for b. Is there a way of getting a per-row value from uuid_generate_v1() without doing

Re: [GENERAL] Why schema of table is removed from explain?

2011-09-01 Thread Thom Brown
On 1 September 2011 19:08, hubert depesz lubaczewski wrote: > example: > $ create schema x; > CREATE SCHEMA > > $ create table x.y as select * from pg_class; > SELECT 294 > > $ explain select * from x.y limit 1; > QUERY PLAN > ---

Re: [GENERAL] pgfoundry.org is not accessible

2011-09-01 Thread Raghavendra
Now am able to access it. But for sometime I was not able to access it. --- Regards, Raghavendra EnterpriseDB Corporation Blog: http://raghavt.blogspot.com/ On Fri, Sep 2, 2011 at 3:34 AM, Raghavendra < raghavendra@enterprisedb.com> wrote: > Hi All, > > Am unable to access pgfoundry.org si

[GENERAL] How to get around this limitation (ALTER DATABASE db SET search_path = ...)

2011-09-01 Thread David Johnston
Hi, >From the documentation: "Whenever a new session is subsequently started in that database, the specified value becomes the session default value." Is there some way to get existing sessions to see the new search_path without forcing them to reconnect. Thanks, David J.

[GENERAL] Why schema of table is removed from explain?

2011-09-01 Thread hubert depesz lubaczewski
example: $ create schema x; CREATE SCHEMA $ create table x.y as select * from pg_class; SELECT 294 $ explain select * from x.y limit 1; QUERY PLAN Limit (cost=0.00..0.04 rows=1 width=1

Re: [GENERAL] md5 of table

2011-09-01 Thread Scott Marlowe
On Thu, Sep 1, 2011 at 7:56 AM, Achilleas Mantzios wrote: > Στις Thursday 01 September 2011 15:50:21 ο/η Scott Marlowe έγραψε: >> Really?  I was not aware of size limits of md5, what are they? >> > > sorry, i was wrong. i dont know why i had this impression, > just checked with a 43GB table on a f

[GENERAL] How can I merge two tables?

2011-09-01 Thread Jerry LeVan
Hi, I have tables on my various computers that looks like: Table "public.registrations" Column | Type | Modifiers | Storage | Description --+--+---+--+- software | text | | extended | id | text | | extended | va

Re: [GENERAL] strange table disk sizes

2011-09-01 Thread Scott Marlowe
On Thu, Sep 1, 2011 at 10:04 AM, Rik Bellens wrote: > > after running reindex on the stats_count_pkey, the disk size of this index > was reduced with about 2 gigs, but the size of the table itself was still > very large. > running 'vacuum full' also reduced the table size from 14 gigs to about 2 >

Re: [GENERAL] md5 of table

2011-09-01 Thread Merlin Moncure
2011/9/1 Sim Zacks : > >> OP: >>> >>> I thought about using dblink and the EXCEPT query, but then I need to >>> know the field list of each query result, which is a pain in the butt. >> >> That is not correct.  As long as the table definitions are precisely >> the same, you can move records across

Re: [GENERAL] strange table disk sizes

2011-09-01 Thread Rik Bellens
Op 01-09-11 14:43, Scott Marlowe schreef: On Thu, Sep 1, 2011 at 6:38 AM, Rik Bellens wrote: Op 01-09-11 14:22, Scott Marlowe schreef: Yeah, could be. Take a look at this page: http://wiki.postgresql.org/wiki/Show_database_bloat and see if the query there sheds some light on your situ. thank

Re: [GENERAL] "invalid input syntax for type bytea"

2011-09-01 Thread Alan Millington
Thank you for that. Sure enough, at character 36202 I have found "\\ 51". I assume that the space should be a zero. That appears to be the only error. How odd! --- On Wed, 31/8/11, Tom Lane wrote: From: Tom Lane Subject: Re: [GENERAL] "invalid input syntax for type bytea" To: "Alan Millington

Re: [GENERAL] md5 of table

2011-09-01 Thread Robert Treat
2011/9/1 Merlin Moncure : > 2011/9/1 Grzegorz Jaśkiewicz : >> On Thu, Sep 1, 2011 at 11:14 AM, Sim Zacks wrote: >>> On 09/01/2011 12:26 PM, Pavel Stehule wrote: Hello postgres=# create table tt(a int, b varchar); CREATE TABLE postgres=# insert into tt values(10,'hello

Re: [GENERAL] Variable column name

2011-09-01 Thread Bill Moran
In response to "Bob Pawley" : > > From: Bill Moran > > In response to "Bob Pawley" : > > > > I want to add information to multiple columns (20 - 40) by employing a > > loop. Each pass of the loop will populate one column with an array. > > > > I have tried and I have read that variables can not

Re: [GENERAL] Variable column name

2011-09-01 Thread Adrian Klaver
On Thursday, September 01, 2011 8:04:49 am Bob Pawley wrote: > -Original Message- > From: Bill Moran > Sent: Thursday, September 01, 2011 7:59 AM > To: Bob Pawley > Cc: Postgresql > Subject: Re: [GENERAL] Variable column name > > In response to "Bob Pawley" : > > I want to add information

Re: [GENERAL] Variable column name

2011-09-01 Thread Scott Ribe
On Sep 1, 2011, at 9:04 AM, Bob Pawley wrote: > Would it be possible for you to point me to an example?? The EXECUTE command is what you want. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] Variable column name

2011-09-01 Thread Bob Pawley
-Original Message- From: Bill Moran Sent: Thursday, September 01, 2011 7:59 AM To: Bob Pawley Cc: Postgresql Subject: Re: [GENERAL] Variable column name In response to "Bob Pawley" : I want to add information to multiple columns (20 – 40) by employing a loop. Each pass of the loop

Re: [GENERAL] Variable column name

2011-09-01 Thread Bill Moran
In response to "Bob Pawley" : > > I want to add information to multiple columns (20 – 40) by employing a loop. > Each pass of the loop will populate one column with an array. > > I have tried and I have read that variables can not be used to control column > names. > > Is there a means of wor

[GENERAL] Variable column name

2011-09-01 Thread Bob Pawley
Hi I want to add information to multiple columns (20 – 40) by employing a loop. Each pass of the loop will populate one column with an array. I have tried and I have read that variables can not be used to control column names. Is there a means of working around this restriction other than cre

Re: [GENERAL] Memory leak somewhere at PQconnectdb?

2011-09-01 Thread Tom Lane
Antonio Vieiro writes: > I'm running one of my programs with valgrind to check for memory leaks > and I'm seeing something like this: > ==13207== 4 bytes in 1 blocks are still reachable in loss record 1 of 256 These are not bugs; they are just permanent allocations that are still there when the

Re: [GENERAL] strange table disk sizes

2011-09-01 Thread Albe Laurenz
Rik Bellens wrote: > I have two large tables in a database, one containing original data and > the other one derived from the first table. The first table contains > several columns and indexes, while the second table has less columns and > only one index. Both tables have the same number of rows.

Re: [GENERAL] md5 of table

2011-09-01 Thread Sim Zacks
OP: I thought about using dblink and the EXCEPT query, but then I need to know the field list of each query result, which is a pain in the butt. That is not correct. As long as the table definitions are precisely the same, you can move records across dblink without specifying fields. You do

[GENERAL] Memory leak somewhere at PQconnectdb?

2011-09-01 Thread Antonio Vieiro
Hi all, I'm running one of my programs with valgrind to check for memory leaks and I'm seeing something like this: ==13207== 4 bytes in 1 blocks are still reachable in loss record 1 of 256 ==13207==at 0x4026864: malloc (vg_replace_malloc.c:236) ==13207==by 0x43343BD: ??? (in /lib/libcrypt

Re: [GENERAL] function on trigger

2011-09-01 Thread Marcos Hercules Santos
On Aug 31, 7:39 pm, Marcos Hercules Santos wrote: > hi guys > > I'm newbie in Psql and I'm trying to build one function  in order to > count the products for each supplier. So i'm gonna put it quite simply > though this example > > Please, consider a table called books with the following fields >

Re: [GENERAL] md5 of table

2011-09-01 Thread Merlin Moncure
2011/9/1 Grzegorz Jaśkiewicz : > On Thu, Sep 1, 2011 at 11:14 AM, Sim Zacks wrote: >> On 09/01/2011 12:26 PM, Pavel Stehule wrote: >>> >>> Hello >>> >>> postgres=# create table tt(a int, b varchar); >>> CREATE TABLE >>> postgres=# insert into tt values(10,'hello'); >>> INSERT 0 1 >>> >>> postgres=

Re: [GENERAL] md5 of table

2011-09-01 Thread Achilleas Mantzios
Στις Thursday 01 September 2011 15:50:21 ο/η Scott Marlowe έγραψε: > On Thu, Sep 1, 2011 at 3:48 AM, Achilleas Mantzios > wrote: > > md5 has size limitations, the second approach seems more practical. > > Really? I was not aware of size limits of md5, what are they? > sorry, i was wrong. i don

Re: [GENERAL] ERD Tool

2011-09-01 Thread Wolfgang Keller
> Is there any open source ERD Tool for Postgresql Database. > I find some paid tools but looking for free tools. Free or open source? >;-> http://pgdesigner.sourceforge.net/en/index.html http://www.db-main.eu/ http://sourceforge.net/projects/dbdesigner-fork/ And a list of a lot of others: http

Re: [GENERAL] md5 of table

2011-09-01 Thread Scott Marlowe
On Thu, Sep 1, 2011 at 3:48 AM, Achilleas Mantzios wrote: > md5 has size limitations, the second approach seems more practical. Really? I was not aware of size limits of md5, what are they? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscripti

Re: [GENERAL] strange table disk sizes

2011-09-01 Thread Scott Marlowe
On Thu, Sep 1, 2011 at 6:38 AM, Rik Bellens wrote: > Op 01-09-11 14:22, Scott Marlowe schreef: >> Yeah, could be.  Take a look at this page: >> http://wiki.postgresql.org/wiki/Show_database_bloat and see if the >> query there sheds some light on your situ. > > thanks for this answer > > if i run

Re: [GENERAL] strange table disk sizes

2011-09-01 Thread Scott Marlowe
On Thu, Sep 1, 2011 at 6:38 AM, Rik Bellens wrote: > Op 01-09-11 14:22, Scott Marlowe schreef: >> >> On Thu, Sep 1, 2011 at 6:05 AM, Rik Bellens >>  wrote: >>> >>> Op 01-09-11 13:31, Scott Marlowe schreef: On Thu, Sep 1, 2011 at 4:32 AM, Rik Bellens  wrote: > > Hello, >

Re: [GENERAL] strange table disk sizes

2011-09-01 Thread Rik Bellens
Op 01-09-11 14:22, Scott Marlowe schreef: On Thu, Sep 1, 2011 at 6:05 AM, Rik Bellens wrote: Op 01-09-11 13:31, Scott Marlowe schreef: On Thu, Sep 1, 2011 at 4:32 AM, Rik Bellens wrote: Hello, I have two large tables in a database, one containing original data and the other one derived fro

Re: [GENERAL] strange table disk sizes

2011-09-01 Thread Rik Bellens
Op 01-09-11 13:31, Scott Marlowe schreef: On Thu, Sep 1, 2011 at 4:32 AM, Rik Bellens wrote: Hello, I have two large tables in a database, one containing original data and the other one derived from the first table. The first table contains several columns and indexes, while the second table h

Re: [GENERAL] md5 of table

2011-09-01 Thread Sim Zacks
On 09/01/2011 01:35 PM, Grzegorz Jaśkiewicz wrote: On Thu, Sep 1, 2011 at 11:14 AM, Sim Zacks wrote: On 09/01/2011 12:26 PM, Pavel Stehule wrote: Hello postgres=# create table tt(a int, b varchar); CREATE TABLE postgres=# insert into tt

Re: [GENERAL] strange table disk sizes

2011-09-01 Thread Scott Marlowe
On Thu, Sep 1, 2011 at 4:32 AM, Rik Bellens wrote: > > Hello, > > I have two large tables in a database, one containing original data and the > other one derived from the first table. The first table contains several > columns and indexes, while the second table has less columns and only one > ind

Re: [GENERAL] md5 of table

2011-09-01 Thread Sim Zacks
I am not sure if this will work, but you can try it http://www.pgsql.cz/index.php/PostgreSQL_SQL_Tricks#Cast_to_varchar Pavel I appreciate your help, but UDTs don't have input/ouput functions unless you define them manually and I need this for all of my

[GENERAL] strange table disk sizes

2011-09-01 Thread Rik Bellens
Hello, I have two large tables in a database, one containing original data and the other one derived from the first table. The first table contains several columns and indexes, while the second table has less columns and only one index. Both tables have the same number of rows. Nevertheless,

Re: [GENERAL] md5 of table

2011-09-01 Thread Grzegorz Jaśkiewicz
On Thu, Sep 1, 2011 at 11:14 AM, Sim Zacks wrote: > On 09/01/2011 12:26 PM, Pavel Stehule wrote: >> >> Hello >> >> postgres=# create table tt(a int, b varchar); >> CREATE TABLE >> postgres=# insert into tt values(10,'hello'); >> INSERT 0 1 >> >> postgres=# select md5(array_to_string(array_agg(md5(

Re: [GENERAL] md5 of table

2011-09-01 Thread Sim Zacks
On 09/01/2011 12:26 PM, Pavel Stehule wrote: Hello postgres=# create table tt(a int, b varchar); CREATE TABLE postgres=# insert into tt values(10,'hello'); INSERT 0 1 postgres=# select md5(array_to_string(array_agg(md5(tt::text)),'')) from tt; md5 ---

Re: [GENERAL] md5 of table

2011-09-01 Thread Achilleas Mantzios
md5 has size limitations, the second approach seems more practical. Στις Thursday 01 September 2011 12:30:45 ο/η Karsten Hilbert έγραψε: > On Thu, Sep 01, 2011 at 11:47:24AM +0300, Sim Zacks wrote: > > > Is there a way to get an md5 or other hash of an entire table? > > > > I want to be able to

Re: [GENERAL] md5 of table

2011-09-01 Thread Karsten Hilbert
On Thu, Sep 01, 2011 at 11:47:24AM +0300, Sim Zacks wrote: > Is there a way to get an md5 or other hash of an entire table? > > I want to be able to easily compare 2 tables in different databases. > > I thought about using dblink and the EXCEPT query, but then I need to > know the field list of

[GENERAL] md5 of table

2011-09-01 Thread Sim Zacks
Is there a way to get an md5 or other hash of an entire table? I want to be able to easily compare 2 tables in different databases. I thought about using dblink and the EXCEPT query, but then I need to know the field list of each query result, which is a pain in the butt. If I could return an

Re: [GENERAL] function param and declared variable of same name

2011-09-01 Thread Sim Zacks
On 09/01/2011 09:58 AM, Pavel Stehule wrote: 2011/9/1 Sim Zacks : Tested in 8.2 and 9.0.1 In plpgsql, if you have a function parameter and a variable of the same name, it ignores the value passed in and initializes the variable to null. The correct action, IM