Re: [GENERAL]about Command Prompt.

2007-10-09 Thread Hiroshi Saito
- Original Message - From: longlong thanks ! :-) P.S) GUI edit can do pgpass.conf in pgAdminIII. Please use it.! Regards, Hiroshi Saito 2007/10/10, Hiroshi Saito <[EMAIL PROTECTED]>: Hi. - Original Message - From: longlong if it is not in Command Prompt how can i work in

Re: [GENERAL]about Command Prompt

2007-10-09 Thread Stuart Cooper
about Command Prompt: http://www.commandprompt.com/about/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL]about Command Prompt.

2007-10-09 Thread Hiroshi Saito
Hi. - Original Message - From: longlong if it is not in Command Prompt how can i work in a .bat file like that. and i don't want the user input password,no interaction. Ahh, Ok. Please see. http://developer.postgresql.org/pgdocs/postgres/libpq-pgpass.html notepad "%APPDATA%\postgr

Re: [GENERAL] SLEEP in posgresql

2007-10-09 Thread Jasbinder Singh Bali
I'm using Postgresql Version 8.1.4. on fedora core 6 I'm pretty sure that pg_sleep is not implemented in 8.1. Am not sure what is the work around Jas On 10/10/07, Harpreet Dhaliwal <[EMAIL PROTECTED]> wrote: > > I think pg_sleep is not implemented in 8.1 and earlier versions. Is there > any alter

[GENERAL] replacing single quotes

2007-10-09 Thread Ow Mun Heng
Input is of form 'ppp','aaa','bbb' I want it to be stripped of quotes to become ppp,aaa,bbb escaping the quote would work but it means I will have to do some magic on the input as well to escape it prior to replacing it. select replace('AB\'A','\'','C') this works Can I buy a clue here? oh

Re: [GENERAL] SLEEP in posgresql

2007-10-09 Thread Guy Rouillier
Jasbinder Singh Bali wrote: Hi, I have a while loop and I want to re-iterate after every 't' seconds. I was reading up on the postgresql documentation that says pg_sleep(t) should be handy. However i doesn't work. Hmmm, I'm looking at section 9.9.5 Delaying Execution in the PostgreSQL 8.2.0 D

[GENERAL] SLEEP in posgresql

2007-10-09 Thread Jasbinder Singh Bali
Hi, I have a while loop and I want to re-iterate after every 't' seconds. I was reading up on the postgresql documentation that says pg_sleep(t) should be handy. However i doesn't work. Instead of that, I re-engineered my while loop in the stored procedure as follows. while a=b loop --do somet

Re: [GENERAL] How to speedup intarray aggregate function?

2007-10-09 Thread Filip Rembiałkowski
2007/10/10, Dmitry Koterov <[EMAIL PROTECTED]>: > Hello. > > I created an aggregate: > > CREATE AGGREGATE intarray_aggregate_push (_int4) > ( > STYPE = _int4, > SFUNC = intarray_push_array, > INITCOND = '{}' > ); > > (or - I may use _int_union instead of intarray_push_array, its speed is > pr

Re: [GENERAL] Generating subtotal reports direct from SQL

2007-10-09 Thread Gregory Stark
"Owen Hartnett" <[EMAIL PROTECTED]> writes: > Such that the final table has additional subtotal rows with the aggregate sum > of the amounts. I'm thinking I can generate two tables and merge them, but is > there an easier way using a fancy Select statement? Unfortunately the fancy SQL feature yo

[GENERAL] How to speedup intarray aggregate function?

2007-10-09 Thread Dmitry Koterov
Hello. I created an aggregate: CREATE AGGREGATE intarray_aggregate_push (_int4) ( STYPE = _int4, SFUNC = intarray_push_array, INITCOND = '{}' ); (or - I may use _int_union instead of intarray_push_array, its speed is practically the same in my case). This aggregate merges together a list o

Re: [GENERAL] Generating subtotal reports direct from SQL

2007-10-09 Thread Erik Jones
On Oct 9, 2007, at 4:53 PM, Owen Hartnett wrote: I'm hoping there's a real easy way of doing this that I'm just missing: Given a Select statement such as: Select ID, code, amount from foo where code < 10; that gives me a table like this: ID codeamount ___

[GENERAL] Generating subtotal reports direct from SQL

2007-10-09 Thread Owen Hartnett
I'm hoping there's a real easy way of doing this that I'm just missing: Given a Select statement such as: Select ID, code, amount from foo where code < 10; that gives me a table like this: ID codeamount _ 1 4 20 2

Re: [GENERAL] slow request

2007-10-09 Thread Steve Atkins
On Oct 9, 2007, at 6:34 AM, [EMAIL PROTECTED] wrote: Hi ! I am using postgreSQL v8.1.5 with latest odbc driver v8.02.0500. I have very slow request between my server and my client. They are both on the same switch 100Mb/s. I have no particular network problems. I use the pgadmin tool to do my r

Re: [GENERAL] DB upgrade

2007-10-09 Thread Richard Huxton
Andrew Kelly wrote: On Tue, 2007-10-09 at 13:58 +0200, Peter Eisentraut wrote: Am Dienstag, 9. Oktober 2007 schrieb Andrew Kelly: Unless my installation is unique in some way of which I'm yet unaware, Yes, it's a Debian package. Indeed, yes. Where can I read what that means in the great sc

Re: [GENERAL] PG_TRY(), PG_CATCH()....

2007-10-09 Thread Alex Vinogradovs
No, I'm not worried about them failing. My code isn't transactional... I'm just worried about getting whole bunch of warnings about reference leaks. On Tue, 2007-10-09 at 09:59 -0400, Alvaro Herrera wrote: > The only code that knows how to cleanup completely after transaction > failure is the su

Re: [GENERAL] Solutions for listening on multiple ports?

2007-10-09 Thread Scott Marlowe
On 10/9/07, Jason L. Buberel <[EMAIL PROTECTED]> wrote: > > Is there a 'generally accepted' best practice for enabling a single > postgres instance to listen for client connections on more than one ip/port > combination? > > As far as I can tell, the 'listen_address' and 'port' configuration > va

Re: [GENERAL] Solutions for listening on multiple ports?

2007-10-09 Thread Erik Jones
On Oct 9, 2007, at 11:22 AM, Jason L. Buberel wrote: Is there a 'generally accepted' best practice for enabling a single postgres instance to listen for client connections on more than one ip/port combination? As far as I can tell, the 'listen_address' and 'port' configuration variables c

[GENERAL] Solutions for listening on multiple ports?

2007-10-09 Thread Jason L. Buberel
Is there a 'generally accepted' best practice for enabling a single postgres instance to listen for client connections on more than one ip/port combination? As far as I can tell, the 'listen_address' and 'port' configuration variables can only accommodate single values: listen_address = 127.

Re: [GENERAL] slow request

2007-10-09 Thread Frank Finner
On Tue, 09 Oct 2007 10:34:45 - [EMAIL PROTECTED] thought long, then sat down and wrote: > Hi ! > I am using postgreSQL v8.1.5 with latest odbc driver v8.02.0500. > I have very slow request between my server and my client. They are > both on the same switch 100Mb/s. I have no particular networ

Re: [GENERAL] slow request

2007-10-09 Thread Scott Marlowe
On 10/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi ! > I am using postgreSQL v8.1.5 with latest odbc driver v8.02.0500. > I have very slow request between my server and my client. They are > both on the same switch 100Mb/s. I have no particular network > problems. > I use the pgadmin too

[GENERAL] slow request

2007-10-09 Thread michael . guiard
Hi ! I am using postgreSQL v8.1.5 with latest odbc driver v8.02.0500. I have very slow request between my server and my client. They are both on the same switch 100Mb/s. I have no particular network problems. I use the pgadmin tool to do my request. My database is compose of one table. This table

Re: [GENERAL] starting a stored procedure+rule AFTER an insert

2007-10-09 Thread Bima Djaloeis
Thanks for the reply, is there any online reference / tutorial for this? -BD 2007/10/8, Douglas McNaught <[EMAIL PROTECTED]>: > > "Bima Djaloeis" <[EMAIL PROTECTED]> writes: > > > I have implemented a stored procedure that writes out the newest DB > > entry on insert, and combined it with a rule.

Re: [GENERAL] disjoint union types

2007-10-09 Thread Erik Jones
On Oct 9, 2007, at 9:38 AM, Sam Mason wrote: Hi, I was after opinions as to the best way to lay tables out to get the effect of a "disjoint union" type (also known as a "tagged union"). When I have to do this at the moment, I'm creating a structure like: CREATE TABLE circle ( id SERIAL PRIMA

[GENERAL] disjoint union types

2007-10-09 Thread Sam Mason
Hi, I was after opinions as to the best way to lay tables out to get the effect of a "disjoint union" type (also known as a "tagged union"). When I have to do this at the moment, I'm creating a structure like: CREATE TABLE circle ( id SERIAL PRIMARY KEY, radius REAL NOT NULL ); CREATE TABLE

Re: [GENERAL] DB upgrade

2007-10-09 Thread Dimitri Fontaine
Le mardi 09 octobre 2007, Andrew Kelly a écrit : > On Tue, 2007-10-09 at 13:58 +0200, Peter Eisentraut wrote: > Where can I read what that means in the great scheme of things? > Are you saying that Deb is markedly different from other packages (.rpm) > or that any packaged version of PG is differen

Re: [GENERAL] DB upgrade

2007-10-09 Thread Andrew Kelly
On Tue, 2007-10-09 at 13:58 +0200, Peter Eisentraut wrote: > Am Dienstag, 9. Oktober 2007 schrieb Andrew Kelly: > > Unless my installation is unique in some way of which I'm yet unaware, > > Yes, it's a Debian package. Indeed, yes. Where can I read what that means in the great scheme of things?

Re: [GENERAL] move whole schema to a new tablespace

2007-10-09 Thread Scott Marlowe
On 10/9/07, Rhys Stewart <[EMAIL PROTECTED]> wrote: > Hi all, > short of issuing single commands for each table is there a way to move > the an entire schema to a new tablespace, indices and all? I'm pretty sure you're gonna have to write a short pl/pgsql script to do that. --

Re: [GENERAL] DB upgrade

2007-10-09 Thread Albe Laurenz
Andrew Kelly wrote: > I've read dozens of times in these lists that when one is > upgrading from an older to newer version of PG, the DB > being dumped (older version) should be done so using > pg_dump from the newer version. [...] > Which bit exactly are we supposed to use from the > newer versi

[GENERAL] move whole schema to a new tablespace

2007-10-09 Thread Rhys Stewart
Hi all, short of issuing single commands for each table is there a way to move the an entire schema to a new tablespace, indices and all? ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an i

Re: [GENERAL] PG_TRY(), PG_CATCH()....

2007-10-09 Thread Alvaro Herrera
Alex Vinogradovs wrote: > Which works fine with successful queries, but for each > unsuccessful query it complains about reference leaks > and not properly closed relations. > Later on I've solved that with use of subtransactions, which > provide some proper cleanup mechanisms, but I was wonderin

Re: [GENERAL] "timer" script from SAMS book or equivalent?

2007-10-09 Thread korry.douglas
In the book PostgreSQL (2nd ed) the author mentions a timer script he wrote to analyze various performance bits about PostgreSQL. I've looked everywhere and can't find it. Does anyone know where I can find a copy, or find an equivalent tool? Hi John, sorry for the delay in getting back to

Re: [GENERAL]about Command Prompt.

2007-10-09 Thread Hiroshi Saito
Hi. runas is not required. for example) C:\Program Files\PostgreSQL\8.3-beta1\bin>psql -f filename.sql postgres postgres Password for user postgres: pleae see. psql --help Regards, Hiroshi Saito - Original Message - From: longlong To: pgsql-general@postgresql.org Sent: Tuesday,

Re: [GENERAL] "timer" script from SAMS book or equivalent?

2007-10-09 Thread John Wells
- "Owen Hartnett" <[EMAIL PROTECTED]> wrote: > At 11:57 PM +0400 10/5/07, John Wells wrote: > >- "Felipe de Jesús Molina Bravo" <[EMAIL PROTECTED]> > wrote: > >> May be can help you \timing in psql > >> > >> El vie, 05-10-2007 a las 21:32 +0400, John Wells escribió: > >> > Guys, > >> >

[GENERAL]about Command Prompt.

2007-10-09 Thread longlong
what i want is using the psql to excute a serial SQL command like create table in a file. but i have tried " runas /noprofile /env /user:postgres "f:\postgre\bin\psql -f filename" "in Windows cmd ,it doesn't work. Is there any way to do this or How can I make my order work just like in Comman

Re: [GENERAL] Lifting WHERE conditions out of inner select

2007-10-09 Thread John D. Burger
Tom Lane wrote: The planner does not look for this type of situation though, and after some study I think it'd be more trouble than it was worth. It'd be less than trivial to determine whether the upper references occurred only in places where it was safe to pull them up, and the actual pulli

Re: [GENERAL] DB upgrade

2007-10-09 Thread Peter Eisentraut
Am Dienstag, 9. Oktober 2007 schrieb Andrew Kelly: > Unless my installation is unique in some way of which I'm yet unaware, Yes, it's a Debian package. > pg_dump seems to be just a handful of lines in a perl script. In fact, > pg_dump, pg_restore and pg_dumpall are all simlinks to the same simple

[GENERAL] DB upgrade

2007-10-09 Thread Andrew Kelly
Hi folks, please forgive what feels like a no-brainer even as I ask it, but... I've read dozens of times in these lists that when one is upgrading from an older to newer version of PG, the DB being dumped (older version) should be done so using pg_dump from the newer version. I think I've probabl

Re: [GENERAL] foreign keys and memory consumption

2007-10-09 Thread Simon Riggs
On Tue, 2007-10-09 at 11:28 +0200, Jan Poslusny wrote: > pg 8.2.4 on Fedora Core 6 x86-64, mostly default postgres.conf just > shared memory buffers increased to 256M. 1GB RAM. > I attempt to insert ~200k rows into table in one transaction from psql > console, calling stored function of plperlu

[GENERAL] foreign keys and memory consumption

2007-10-09 Thread Jan Poslusny
Hi all, pg 8.2.4 on Fedora Core 6 x86-64, mostly default postgres.conf just shared memory buffers increased to 256M. 1GB RAM. I attempt to insert ~200k rows into table in one transaction from psql console, calling stored function of plperlu language, which inserts row by row via spi_exec_prepar

Re: [GENERAL] Multiple versions on same box

2007-10-09 Thread Scott Marlowe
On 10/9/07, Reece Hart <[EMAIL PROTECTED]> wrote: > > On Mon, 2007-10-08 at 17:34 -0700, Ralph Smith wrote: > > What is the best way to upgrade? Use pg_dumpall (using 8.2's program), > afterwards redirect that file into v8.2 via psql v8.2? > > > There are lots of ways to do this. My favorite is t