[GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
Hi I am volume testing a db model that consists of a paritioned tables. The db has been running for a week and a half now and has built up to contain approx 55000 partition tables of 18000 rows each. The root table therefore contains about 1 billion rows. When I try to do a "select count(*)" of th

[GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-25 Thread Reg Me Please
Hi all. On the very same database and session I have two different (but similar) queries behaving in a very different way as far as timings. This is the first one: prove=# explain analyze select d.* from t_vcol natural join v_dati_attuali d natural join tt_elem where vtab_id='TEST';

Re: [GENERAL] Determine query run-time from pg_* tables

2007-10-25 Thread Ow Mun Heng
On Tue, 2007-10-23 at 09:28 -0500, Erik Jones wrote: > > Ow Mun Heng wrote: > >> Hi, > >> > >> Is there a method to obtain the query's runtime from any of the pg_* > >> tables? > query_start does, however, give you the time that the query started. > I use something like > > SELECT procpid, cli

Re: [GENERAL] Indexes & Primary Keys (based on the same columns)

2007-10-25 Thread Ow Mun Heng
On Mon, 2007-10-22 at 08:20 -0400, Bill Moran wrote: > In response to "Joshua D. Drake" <[EMAIL PROTECTED]>: > > > Ow Mun Heng wrote: > > > I'm wondering if what I'm doing is redundant. > > > > > > I have a primary key on columns (A,B,C,D) > > > and I've also defined an index based on the same c

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Gregory Stark
<[EMAIL PROTECTED]> writes: > > ERROR: out of memory > DETAIL: Failed on request of size 130. > > Does anybody have any suggestion as to which parameter I should tune to > give it more memory to be able to perform queries on the root table? This indicates that malloc() failed which mea

Re: [GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-25 Thread Gregory Stark
"Reg Me Please" <[EMAIL PROTECTED]> writes: >-> Seq Scan on tt_elem (cost=0.00..29.40 rows=1940 width=8) > (actual time=0.012..0.013 rows=1 > loops=1) The discrepancy etween the estimated rows and actual rows makes me think you've not a

Re: [GENERAL] Install plJava

2007-10-25 Thread João Paulo Zavanela
>João Paulo Zavanela wrote: >> >> The file pljava.dll exist in directory, why this error? >> Someone can help me? > >PL/Java has it's own mailing list here: >http://gborg.postgresql.org/mailman/listinfo/pljava-dev > >I think it is still active, but I'm not sure. Sorry, I'm short on time. > Searc

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
Hi I have tried to answer to the best of my knowledge but its running on Soalris 10, and I am not that familiar with solaris ( Go Linux!!! :) > any more memory. Either you have a very low memory ulimit (look at ulimit > -a > in the same session as Postgres) or your machine is really low on memory

[GENERAL] execute pg_dump via python

2007-10-25 Thread Garry Saddington
I am using zope on windows with an external python method to backup my database. I am struggling to run the following command: pg_dump.exe database > file I have tried using os.popen - no luck and also subprocess.Popen. eg: import subprocess subprocess.Popen(['c:/dir/dir/pg_dump.exe','

Re: [GENERAL] conditional alter table add ?

2007-10-25 Thread Peter Childs
On 17/10/2007, Lothar Behrens <[EMAIL PROTECTED]> wrote: > > Hi, > > I do convert an UML XMI model to a database script to create the > database schema. > To enable multiple iterations I need conditional alter table add > column like syntax. > > Is there any way to do this ? Not easily in a stra

Re: [GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-25 Thread Gregory Stark
"Gregory Stark" <[EMAIL PROTECTED]> writes: > "Reg Me Please" <[EMAIL PROTECTED]> writes: > >>-> Seq Scan on tt_elem (cost=0.00..29.40 rows=1940 width=8) >> (actual time=0.012..0.013 rows=1 >> loops=1) > > The discrepancy etween the estim

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Gregory Stark
<[EMAIL PROTECTED]> writes: > max_connections = 1000 Do you actually have anywhere near this number of processes? What is your setting for work_mem? Keep in mind every process could use as much as work_mem and actually it's possible to use that much several times over. Also, what is your mainten

Re: [GENERAL] subversion support?

2007-10-25 Thread Roberts, Jon
Robert, that does sound better. It keeps the names of the files in svn consistent with the database object names which is essential. It also makes it automatic. Unfortunately, it doesn't tell you who did the changes. Do you want to share that code? Thanks! Jon -Original Message- Fr

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> <[EMAIL PROTECTED]> writes: > >> max_connections = 1000 > > Do you actually have anywhere near this number of processes? What is your > setting for work_mem? Keep in mind every process could use as much as > work_mem > and actually it's possible to use that much several times over. > > Also, what

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > > are a dump of Postgres's current memory allocations and could be useful in > > showing if there's a memory leak causing this. > > The file is 20M, these are the last lines: (the first line continues > unttill ff_26000) > > > idx_attributes_g1_seq_1_ff_4_value7: 1024

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Martin Gainty
God morgen Please display these memory settings from your postgresql.conf file sort_mem shared_buffers Takk Martin-- - Original Message - From: <[EMAIL PROTECTED]> To: "Gregory Stark" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; Sent: Thursday, October 25, 2007 7:07 AM Subject: Re: [GENE

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> God morgen > > Please display these memory settings from your postgresql.conf file > sort_mem > shared_buffers I have shown the entire configuration. if its not in the configuration shown, I have changed its value. I have used the configuration example provided by Sun regarding running postgres

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> [EMAIL PROTECTED] wrote: > >> > are a dump of Postgres's current memory allocations and could be >> useful in >> > showing if there's a memory leak causing this. >> >> The file is 20M, these are the last lines: (the first line continues >> unttill ff_26000) >> >> >> idx_attributes_g1_seq_1_ff_4_v

[GENERAL] Delete/Update with ORDER BY

2007-10-25 Thread Evandro Andersen
In Oracle you can use this: DELETE FROM A WHERE A1 = 10 ORDER BY A2 There is something in the Postgresql ? Evandro Andersen Brazil Postgresql 8.2 Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento! http://br.mail.yahoo.com/ ---

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] wrote: > > > >> > are a dump of Postgres's current memory allocations and could be > >> useful in > >> > showing if there's a memory leak causing this. > >> > >> The file is 20M, these are the last lines: (the first line continues > >> unttill ff_26000

Re: [GENERAL] Delete/Update with ORDER BY

2007-10-25 Thread A. Kretschmer
am Thu, dem 25.10.2007, um 5:25:14 -0700 mailte Evandro Andersen folgendes: > In Oracle you can use this: > > > > DELETE FROM A WHERE A1 = 10 ORDER BY A2 > > > > There is something in the Postgresql ? Can you explain this a little bit more? I can't see any sense. Either i delete rows with

Re: [GENERAL] Delete/Update with ORDER BY

2007-10-25 Thread Roberts, Jon
I have never seen order by in a delete statement in Oracle so I tested it. SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 25 07:45:50 2007 Copyright (c) 1982, 2005, Oracle. All rights reserved. SQL> connect / as sysdba Connected. SQL> create table a (a1 number, a2 number); Table created

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> I have shown the entire configuration. if its not in the configuration > shown, I have changed its value. I meant to say "I haven't changed its value" thomas ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-25 Thread Reg Me Please
Il Thursday 25 October 2007 13:20:40 Gregory Stark ha scritto: > "Gregory Stark" <[EMAIL PROTECTED]> writes: > > "Reg Me Please" <[EMAIL PROTECTED]> writes: > >>-> Seq Scan on tt_elem (cost=0.00..29.40 rows=1940 > >> width=8) (actual time=0.012..0.013 rows=1 loops=1) > > > > The d

Re: [GENERAL] subversion support?

2007-10-25 Thread Brad Lhotsky
You could setup a subversion commit hook to export the functions to the database. Then you adjust your development mentality to: 1) Edit the files on the disk 2) Commit to Subversion Then the hook takes over and runs the drop/create automatically, you could even have it email the developer i

Re: [GENERAL] subversion support?

2007-10-25 Thread Roberts, Jon
I could use psql instead of pgAdmin then which isn't what I want. Having used Quest software SQL Navigator since 97 for Oracle and then migrated to Toad for Oracle which both products have integration to source control, it is hard to revert back to a command line or text file solution. pgAdmin s

Re: [GENERAL] Crosstab Problems

2007-10-25 Thread Scott Marlowe
On 10/24/07, Tom Lane <[EMAIL PROTECTED]> wrote: > Joe Conway <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> 1. Treat NULL rowid as a category in its own right. This would conform > >> with the behavior of GROUP BY and DISTINCT, for instance. > > > In any case, the attached changes the behav

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: >> I did a test previously, where I created 1 million partitions (without >> data) and I checked the limits of pg, so I think it should be ok. > Clearly it's not. You couldn't have tested it too much --- even planning a query o

Re: [GENERAL] [PGSQL v8.2.5] Similar queries behave differently

2007-10-25 Thread Scott Marlowe
On 10/25/07, Reg Me Please <[EMAIL PROTECTED]> wrote: > Il Thursday 25 October 2007 13:20:40 Gregory Stark ha scritto: > > "Gregory Stark" <[EMAIL PROTECTED]> writes: > > > "Reg Me Please" <[EMAIL PROTECTED]> writes: > > >>-> Seq Scan on tt_elem (cost=0.00..29.40 rows=1940 > > >>

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> [EMAIL PROTECTED] wrote: >> > [EMAIL PROTECTED] wrote: >> > >> >> > are a dump of Postgres's current memory allocations and could be >> >> useful in >> >> > showing if there's a memory leak causing this. >> >> >> >> The file is 20M, these are the last lines: (the first line continues >> >> unttil

Re: [GENERAL] 8.3b1 in production?

2007-10-25 Thread Peter Childs
On 24/10/2007, Gregory Stark <[EMAIL PROTECTED]> wrote: > > "rihad" <[EMAIL PROTECTED]> writes: > > > Hi, > > > > Does anyone have an idea how risky it is to start using 8.3b1 in > production, > > with the intention of upgrading to release (or newer beta) as soon as it > > becomes available? Risky

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> Alvaro Herrera <[EMAIL PROTECTED]> writes: >> [EMAIL PROTECTED] wrote: >>> I did a test previously, where I created 1 million partitions (without >>> data) and I checked the limits of pg, so I think it should be ok. > >> Clearly it's not. > > You couldn't have tested it too much --- even planning

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Scott Marlowe
On 10/25/07, Tom Lane <[EMAIL PROTECTED]> wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > [EMAIL PROTECTED] wrote: > >> I did a test previously, where I created 1 million partitions (without > >> data) and I checked the limits of pg, so I think it should be ok. > > > Clearly it's not. > > Y

Re: [GENERAL] Crosstab Problems

2007-10-25 Thread Reg Me Please
Il Thursday 25 October 2007 16:29:33 Scott Marlowe ha scritto: > On 10/24/07, Tom Lane <[EMAIL PROTECTED]> wrote: > > Joe Conway <[EMAIL PROTECTED]> writes: > > > Tom Lane wrote: > > >> 1. Treat NULL rowid as a category in its own right. This would > > >> conform with the behavior of GROUP BY and

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > The partitioning facility is designed for partition counts in the tens, > > or maybe hundreds at the most. > > Maybe, but it works even on 55000 partitions as long as the operations are > done against a partition and not

Re: [GENERAL] PostgreSQL and AutoCad

2007-10-25 Thread Josh Tolley
On 10/24/07, Bob Pawley <[EMAIL PROTECTED]> wrote: > Is there any way of converting text from an AutoCad (.dwg ot .dxf) file into > a PostgreSQL Database?? > > Bob Pawley I know nothing of AutoCad, but your message has been sitting for a while without response, so I'll throw out the suggestion th

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Scott Marlowe
On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Alvaro Herrera <[EMAIL PROTECTED]> writes: > >> [EMAIL PROTECTED] wrote: > >>> I did a test previously, where I created 1 million partitions (without > >>> data) and I checked the limits of pg, so I think it should be ok. > > > >> Clearl

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Erik Jones
On Oct 25, 2007, at 9:36 AM, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: are a dump of Postgres's current memory allocations and could be useful in showing if there's a memory leak causing this. The file is 20M, these are the last lines: (the first line c

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Scott Marlowe
On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > > I am volume testing a db model that consists of a paritioned tables. The > db has been running for a week and a half now and has built up to contain > approx 55000 partition tables of 18000 rows each. The root table therefore > cont

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> [EMAIL PROTECTED] wrote: > It will work on a million partitions and more, provided you do > operations on single partitions. Thats good enough for me, thats exactly what I want. I just used the select count() on the root to get a feeling of how many rows it was in total. An then I thought that t

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
>> The db worked fine until it reached perhaps 30-40 thousand partitions. > > It depends on how you have the partitions set up and how you're > accessing them. Are all of these partitions under the same parent > table? If so, then trying run a SELECT COUNT(*) against the parent > table is simply

Re: [GENERAL] 8.3b1 in production?

2007-10-25 Thread Scott Marlowe
On 10/25/07, Peter Childs <[EMAIL PROTECTED]> wrote: > I was wondering why my PITR base back up was taking 2 hours on my 8.3 test > database where as it takes 50 minutes on 8.1 and the database files are > meant to be smaller on a freshly installed 8.3 server rather than a 8.1.1 > server that aint

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] wrote: > > It will work on a million partitions and more, provided you do > > operations on single partitions. > > Thats good enough for me, thats exactly what I want. In that case, why use partitions at all? They are simple independent tables. --

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Erik Jones
On Oct 25, 2007, at 10:36 AM, [EMAIL PROTECTED] wrote: The db worked fine until it reached perhaps 30-40 thousand partitions. It depends on how you have the partitions set up and how you're accessing them. Are all of these partitions under the same parent table? If so, then trying run a SE

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> Are you selecting directly from the child table, or from the parent > table with constraint_exclusion turned on? the problem was when selecting from the parent table, but selecting from child tables are no problem. As stated in other replies, I only wanted to know how many rows where in the tabl

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> So, out of curiosity, I asked my Oracle DBA friend if she'd ever heard > of anyone having 60,000 or so partitions in a table, and she looked at > me like I had a third eye in my forehead and said in her sweet voice > "Well, that would certainly be an edge case". She sounded like she > was worrie

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Alvaro Herrera
Scott Marlowe escribió: > So, out of curiosity, I asked my Oracle DBA friend if she'd ever heard > of anyone having 60,000 or so partitions in a table, and she looked at > me like I had a third eye in my forehead and said in her sweet voice > "Well, that would certainly be an edge case". She soun

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> [EMAIL PROTECTED] wrote: >> Thats good enough for me, thats exactly what I want. > > In that case, why use partitions at all? They are simple independent > tables. For two reasons, - the data logically belongs together. - because its more practical to create tables as childs of a parent table t

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> Excellent, it sounds like you should be fine then. One thing to > note: if you want to get an "idea" of how many rows you have in your > partitions, you can run a SUM aggregate on reltuples in pg_class for > all of your partitions. The more recent the last ANALYZE for each > table, the more ac

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Tom Lane
[EMAIL PROTECTED] writes: >> In that case, why use partitions at all? They are simple independent >> tables. > For two reasons, > - the data logically belongs together. > - because its more practical to create tables as childs of a parent table > than as independent tables. >- changes to the

Re: [GENERAL] subversion support?

2007-10-25 Thread Tino Wildenhain
Hi, Roberts, Jon schrieb: I could use psql instead of pgAdmin then which isn't what I want. Having used Quest software SQL Navigator since 97 for Oracle and then migrated to Toad for Oracle which both products have integration to source control, it is hard to revert back to a command line or te

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> [EMAIL PROTECTED] wrote: >> > [EMAIL PROTECTED] wrote: >> >> Thats good enough for me, thats exactly what I want. >> > >> > In that case, why use partitions at all? They are simple independent >> > tables. >> >> For two reasons, >> - the data logically belongs together. >> - because its more pra

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] wrote: > >> Thats good enough for me, thats exactly what I want. > > > > In that case, why use partitions at all? They are simple independent > > tables. > > For two reasons, > - the data logically belongs together. > - because its more practical to

Re: [GENERAL] subversion support?

2007-10-25 Thread Joshua D. Drake
Roberts, Jon wrote: I could use psql instead of pgAdmin then which isn't what I want. Having used Quest software SQL Navigator since 97 for Oracle and then migrated to Toad for Oracle which both products have integration to source control, it is hard to revert back to a command line or text file

Re: [GENERAL] subversion support?

2007-10-25 Thread Reg Me Please
Ever tried Druid? http://druid.sourceforge.net/ Il Thursday 25 October 2007 18:02:51 Tino Wildenhain ha scritto: > Hi, > > Roberts, Jon schrieb: > > I could use psql instead of pgAdmin then which isn't what I want. > > > > Having used Quest software SQL Navigator since 97 for Oracle and then > >

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> [EMAIL PROTECTED] writes: >>> In that case, why use partitions at all? They are simple independent >>> tables. > >> For two reasons, >> - the data logically belongs together. >> - because its more practical to create tables as childs of a parent >> table >> than as independent tables. >>- ch

Re: [GENERAL] subversion support?

2007-10-25 Thread Roberts, Jon
Complaint? Who is complaining? I am simply asking if this feature that is rather common in other database development tools will ever be added to pgAdmin. And no, I will not sponsor such development. Jon -Original Message- From: Joshua D. Drake [mailto:[EMAIL PROTECTED] Sent: Thur

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Erik Jones
On Oct 25, 2007, at 11:16 AM, Alvaro Herrera wrote: [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Thats good enough for me, thats exactly what I want. In that case, why use partitions at all? They are simple independent tables. For two reasons, - the data logically belongs together

Re: [GENERAL] subversion support?

2007-10-25 Thread Roberts, Jon
I not sure I follow the question about SQL Navigator and Toad. When you edit a function, package, procedure, trigger, etc, it will notify you via a pop-up window if there is a difference in the committed version and the database version. You can then click "show differences" and then it pops up

Re: [GENERAL] select count() out of memory

2007-10-25 Thread tfinneid
> this is my config > > checkpoint_segments = 96 > effective_cache_size = 128000 > shared_buffers = 43 > max_fsm_pages = 208000 > max_fsm_relations = 1 > > max_connections = 1000 > > autovacuum = off# enable autovacuum subprocess? > > fsync = on

Re: [GENERAL] subversion support?

2007-10-25 Thread Roberts, Jon
No I haven't. Thanks for the tip. Jon -Original Message- From: Reg Me Please [mailto:[EMAIL PROTECTED] Sent: Thursday, October 25, 2007 11:25 AM To: pgsql-general@postgresql.org Cc: Tino Wildenhain; Roberts, Jon Subject: Re: [GENERAL] subversion support? Ever tried Druid? http://drui

Re: [GENERAL] 8.3b1 in production?

2007-10-25 Thread Gregory Stark
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > On 10/25/07, Peter Childs <[EMAIL PROTECTED]> wrote: >> I was wondering why my PITR base back up was taking 2 hours on my 8.3 test >> database where as it takes 50 minutes on 8.1 and the database files are >> meant to be smaller on a freshly installed

[GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Ralph Smith
I have versions 7.4 (port=5433) & 8.2 (port=5432) on this Ubuntu box. I want to use v8.2's pg_dumpall to export v7.4's data into a text file. (IDEALLY I'd like to port it directly to psql and avoid the file, but I don't know if I can do that.) Anyway, when I: prompt:/usr/lib/postgresql/8.2/bi

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Tom Lane
[EMAIL PROTECTED] writes: >> In other words, you really should have only one table; they aren't >> independent. What you need to do is dial down your ideas of how many >> partitions are reasonable to have. > Yes, but no. Each partition represents a chunk of information on a > discrete timeline. S

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Steve Crawford
Alvaro Herrera wrote: ... > > You can use CREATE TABLE LIKE, which copies the definition but does not > set the inheritance. > Well, sort of. Unless I'm using it incorrectly it only copies the basic column definitions and, as optionally specified, defaults and some of the constraints. Primary

Re: [GENERAL] subversion support?

2007-10-25 Thread Karsten Hilbert
On Thu, Oct 25, 2007 at 11:35:32AM -0500, Roberts, Jon wrote: > Complaint? Who is complaining? > > I am simply asking if this feature that is rather common in other database > development tools will ever be added to pgAdmin. Why are you then asking on a *PostgreSQL* list ? > And no, I will no

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Tom Lane
Ralph Smith <[EMAIL PROTECTED]> writes: > I want to use v8.2's pg_dumpall to export v7.4's data into a text file. > prompt:/usr/lib/postgresql/8.2/bin$ ./pg_dumpall -c -v -p 5433 > > myfile.txt Works for me. What does the -v give you on stderr? Also, 7.4.what-exactly and 8.2.what-exactly?

Re: [GENERAL] subversion support?

2007-10-25 Thread brian
Roberts, Jon wrote: When you edit a function, package, procedure, trigger, etc, it will notify you via a pop-up window if there is a difference in the committed version and the database version. You can then click "show differences" and then it pops up another window with your typical code diff

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Scott Marlowe
On 10/25/07, Steve Crawford <[EMAIL PROTECTED]> wrote: > Alvaro Herrera wrote: > ... > > > > You can use CREATE TABLE LIKE, which copies the definition but does not > > set the inheritance. > > > > Well, sort of. > > Unless I'm using it incorrectly it only copies the basic column > definitions and,

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Ralph Smith
== On Oct 25, 2007, at 10:13 AM, Tom Lane wrote: Ralph Smith <[EMAIL PROTECTED]> writes: I want to use v8.2's pg_dumpall to export v7.4's data into a text file. prompt:/usr/lib/postgresql/8.2/bin$ ./pg_dumpall -c -v -p 5433 > myfile.txt Works for me. What does

Re: [GENERAL] subversion support?

2007-10-25 Thread Dave Page
> --- Original Message --- > From: "Roberts, Jon" <[EMAIL PROTECTED]> > To: pgsql-general@postgresql.org > Sent: 25/10/07, 17:35:32 > Subject: Re: [GENERAL] subversion support? > > Complaint? Who is complaining? > > I am simply asking if this feature that is rather common in other da

Re: [GENERAL] subversion support?

2007-10-25 Thread Magnus Hagander
Roberts, Jon wrote: > So the long story short I'm getting is, "no it is not on the radar". This > is terribly ironic given the fact that pgAdmin is developed using source > control but the code you write with the tool doesn't have any hooks into > source control. Actually, it is on my personal ra

Re: [GENERAL] subversion support?

2007-10-25 Thread Gregory Stark
"Dave Page" <[EMAIL PROTECTED]> writes: >> Complaint? Who is complaining? >> >> I am simply asking if this feature that is rather common in other database >> development tools will ever be added to pgAdmin. > > pgAdmin II had change control. No-one ever really used it though so we never > both

Re: [GENERAL] subversion support?

2007-10-25 Thread Scott Marlowe
On 10/25/07, Gregory Stark <[EMAIL PROTECTED]> wrote: > "Dave Page" <[EMAIL PROTECTED]> writes: > > >> Complaint? Who is complaining? > >> > >> I am simply asking if this feature that is rather common in other database > >> development tools will ever be added to pgAdmin. > > > > pgAdmin II had ch

Re: [GENERAL] subversion support?

2007-10-25 Thread Dave Page
> --- Original Message --- > From: Gregory Stark <[EMAIL PROTECTED]> > To: "Dave Page" <[EMAIL PROTECTED]> > Sent: 25/10/07, 19:06:12 > Subject: Re: subversion support? > > The situation is complicated somewhat by the SQL "ALTER TABLE" and so on > commands which you need to use instead o

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Tom Lane
Ralph Smith <[EMAIL PROTECTED]> writes: > On Oct 25, 2007, at 10:13 AM, Tom Lane wrote: >> Works for me. What does the -v give you on stderr? Also, >> 7.4.what-exactly and 8.2.what-exactly? > Sorry for the bulk here... Hmph. Nothing obviously wrong there, except that it's not finding anything

Re: [GENERAL] subversion support?

2007-10-25 Thread Roberts, Jon
That is awesome. Can it be added to pga3? Jon -Original Message- From: Dave Page [mailto:[EMAIL PROTECTED] Sent: Thursday, October 25, 2007 2:11 PM To: Gregory Stark Cc: Roberts, Jon; pgsql-general@postgresql.org Subject: Re: subversion support? > --- Original Message --- >

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Ralph Smith
On Oct 25, 2007, at 12:24 PM, Tom Lane wrote: Ralph Smith <[EMAIL PROTECTED]> writes: On Oct 25, 2007, at 10:13 AM, Tom Lane wrote: Works for me. What does the -v give you on stderr? Also, 7.4.what-exactly and 8.2.what-exactly? Sorry for the bulk here... Hmph. Nothing obviously wrong t

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Tom Lane
Ralph Smith <[EMAIL PROTECTED]> writes: > On Oct 25, 2007, at 12:24 PM, Tom Lane wrote: >> Hmph. Nothing obviously wrong there, except that it's not finding >> anything except template1. What does "select * from pg_database" >> show? > postgres=# select * from pg_database ; >datname | datdb

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Ralph Smith
On Oct 25, 2007, at 1:09 PM, Tom Lane wrote: Ralph Smith <[EMAIL PROTECTED]> writes: On Oct 25, 2007, at 12:24 PM, Tom Lane wrote: Hmph. Nothing obviously wrong there, except that it's not finding anything except template1. What does "select * from pg_database" show? postgres=# select * f

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Tom Lane
Ralph Smith <[EMAIL PROTECTED]> writes: > On Oct 25, 2007, at 1:09 PM, Tom Lane wrote: >> Ummm ... those are the column headings for 8.2 pg_database, not 7.4. >> You're looking at the wrong postmaster. > [EMAIL PROTECTED]:/usr/lib/postgresql/7.4/bin$ ./psql > Welcome to psql 7.4.13, the PostgreSQL

Re: [GENERAL] execute pg_dump via python

2007-10-25 Thread Trevor Talbot
On 10/25/07, Garry Saddington <[EMAIL PROTECTED]> wrote: > I am using zope on windows with an external python method to backup my > database. I am struggling to run the following command: > > pg_dump.exe database > file > subprocess.Popen(['c:/dir/dir/pg_dump.exe','database','>','c:/dir/dir/output

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Thomas Finneid
Tom Lane wrote: You are making a common beginner error, which is to suppose that N little tables are better than one big one. They are not. Well that depends on how you define better. For my purposes, it is better. What you're effectively doing is replacing the upper levels of a big tabl

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Scott Marlowe
On 10/25/07, Thomas Finneid <[EMAIL PROTECTED]> wrote: > > Tom Lane wrote: > > > You are making a common beginner error, which is to suppose that N > > little tables are better than one big one. They are not. > > Well that depends on how you define better. For my purposes, it is better. > > > What

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Gregory Stark
"Thomas Finneid" <[EMAIL PROTECTED]> writes: >> What you're >> effectively doing is replacing the upper levels of a big table's indexes >> with lookups in the system catalogs, which in point of fact is a >> terrible tradeoff from a performance standpoint. > > Only if you assume I use all data in

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Ralph Smith
On Oct 25, 2007, at 1:57 PM, Tom Lane wrote: Ralph Smith <[EMAIL PROTECTED]> writes: On Oct 25, 2007, at 1:09 PM, Tom Lane wrote: Ummm ... those are the column headings for 8.2 pg_database, not 7.4. You're looking at the wrong postmaster. [EMAIL PROTECTED]:/usr/lib/postgresql/7.4/bin$ ./ps

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Devrim GÜNDÜZ
Hi, On Thu, 2007-10-25 at 15:36 -0700, Ralph Smith wrote: > [EMAIL PROTECTED]:/usr/lib/postgresql/7.4/bin$ ./psql -p 5433 > psql: FATAL: database "postgres" does not exist 7.4 does not have postgres database. use ./psql template1 -p 5433. -- Devrim GÜNDÜZ PostgreSQL Replication, Consulting, C

Re: [GENERAL] 2 versions running & using pg_dumpall

2007-10-25 Thread Ralph Smith
On Oct 25, 2007, at 3:45 PM, Devrim GÜNDÜZ wrote: ./psql template1 -p 5433 = [EMAIL PROTECTED]:/usr/lib/postgresql/7.4/bin$ ./psql -p 5433 template1 Welcome to psql 7.4.13, the PostgreSQL interactive terminal. Type: \copyright for distribut

[GENERAL] Selecting tree data

2007-10-25 Thread Pat Maddox
I'd like to store some tree data in my database. I want to be able to sort the data but maintain a tree structure. So for example, if I order by a timestamp, I should get - parent1 * child1 * child2 * child3 - parent2 * child4 * child5 and if I reverse the sort order, I get - pare

[GENERAL] [ANN]VTD-XML 2.2

2007-10-25 Thread jimmy Zhang
XimpleWare is proud to announce the the release of version 2.2 of VTD-XML, the next generation XML parsers/indexer/slicer/editor. This release significantly expands VTD-XML's ability to slice, split, edit and incrementally update the XML documents. To this end, we introduce the concept of namesp

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Jorge Godoy
Em Thursday 25 October 2007 13:36:09 [EMAIL PROTECTED] escreveu: > > Regarding dumps and restore; the system will always be offline during > those operations and it will be so for several days, because a new project > might start at another location in the world, so the travelling there > takes tim

Re: [GENERAL] Selecting tree data

2007-10-25 Thread D. Dante Lorenso
Pat Maddox wrote: I'd like to store some tree data in my database. I want to be able to sort the data but maintain a tree structure Is it possible to pull all the data like that with one query? How do I need to structure the table, and what query do I have to run in order to make it happen?

Re: [GENERAL] Selecting K random rows - efficiently!

2007-10-25 Thread John D. Burger
As far as I can tell, all of the proposed solutions lack sample independence. Take the OP's suggested approach of doing something like this: SELECT * FROM mydata WHERE mydata.random_number >= (SELECT RANDOM() OFFSET 0) ORDER BY mydata.random_number ASC LIMIT 100 All you're doing is pi

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Thomas Finneid
Gregory Stark wrote: Tom's point is that if you have 55k tables then just *finding* the newest child table is fairly expensive. You're accessing a not insignificant-sized index and table of tables. And the situation is worse when you consider the number of columns all those tables have, all the

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Thomas Finneid
Scott Marlowe wrote: It may well be that one big table and partial indexes would do what you want. Did you explore partial indexes against one big table? That can be quite handy. Hmm, interresting, I suppose it could work. Tanks for the suggestion, Ill keep it in mind. regards thomas -

Re: [GENERAL] Query_time SQL as a function w/o creating a new type

2007-10-25 Thread Reg Me Please
You could try this: CREATE OR REPLACE FUNCTION foo( out procpid integer, out client_addr inet, out query_time interval, out current_query text ) RETURNS SETOF RECORD AS $BODY$ ... $BODY$ LANGUAGE PLPGSQL VOLATILE; (Thanks to Joen Conway for showing this in tablefunc!) Il Friday 26 October 200

Re: [GENERAL] select count() out of memory

2007-10-25 Thread Thomas Finneid
Jorge Godoy wrote: Em Thursday 25 October 2007 13:36:09 [EMAIL PROTECTED] escreveu: Regarding dumps and restore; the system will always be offline during those operations and it will be so for several days, because a new project might start at another location in the world, so the travelling th

Re: [GENERAL] Query_time SQL as a function w/o creating a new type

2007-10-25 Thread Ow Mun Heng
On Fri, 2007-10-26 at 08:35 +0200, Reg Me Please wrote: > You could try this: > > > CREATE OR REPLACE FUNCTION foo( out procpid integer, out client_addr inet, > out > query_time interval, out current_query text ) > RETURNS SETOF RECORD AS $BODY$ > ... > $BODY$ LANGUAGE PLPGSQL VOLATILE; Some

[GENERAL] Query_time SQL as a function w/o creating a new type

2007-10-25 Thread Ow Mun Heng
Hi, After Erik Jones gave me the idea for this, I started to become lazy to have to type this into the sql everytime I want to see how long a query is taking.. so, I thought that I'll create a function to do just that.. I ended up with.. CREATE OR REPLACE FUNCTION query_time() RETURNS SETOF que