Re: [GENERAL] Printing values on pgadmin tool window using plperlu

2007-05-13 Thread Michael Fuhr
On Sun, May 13, 2007 at 11:51:55PM -0400, Harpreet Dhaliwal wrote: > I have a function written in language plpelu. > Normally, values in perl code are printed using > print statement. > Then same when used in postgres environment won't print messages in > 'Messages' tab to pgadmin query tool window

[GENERAL] EXCEPTION clause not identified

2007-05-13 Thread Jasbinder Singh Bali
Hi, In one of my trigger functions, i'm trying to catch invalid ip address exception CREATE OR REPLACE FUNCTION func_client_socket() RETURNS "trigger" AS $BODY$ DECLARE ip_address_present int4; BEGIN ip_address_present = 1; SELECT inet(NEW.canonic

Re: [GENERAL] Postgres Printed Manuals

2007-05-13 Thread John Meyer
Robert James wrote: > The Postgres docs are great. Unfortunatelty, at 1600 pages, my > printer is a little weary. Are bound & printed editions available? > If not, has anyone had any good experience printing them via any of > the online services? (The ones I contacted said it was too big for > t

[GENERAL] Printing values on pgadmin tool window using plperlu

2007-05-13 Thread Harpreet Dhaliwal
Hi I have a function written in language plpelu. Normally, values in perl code are printed using print statement. Then same when used in postgres environment won't print messages in 'Messages' tab to pgadmin query tool window. How and where can I print these values while running the plperlu funct

Re: [GENERAL] Postgres Printed Manuals

2007-05-13 Thread Stuart Cooper
The Postgres docs are great. Unfortunatelty, at 1600 pages, my printer is a little weary. Are bound & printed editions available? If not, has anyone had any good experience printing them via any of the online services? (The ones I contacted said it was too big for them to print...) You're rig

Re: [GENERAL] Postgres Printed Manuals

2007-05-13 Thread Tom Lane
"Robert James" <[EMAIL PROTECTED]> writes: > Also: wouldn't it be a good way for the Postgres project to raise some > money, by publishing and selling bound and printed versions? It's hard to make any money that way :-(. Rich Morin used to run a business called "Prime Time Freeware" that publishe

Re: [GENERAL] Streaming large data into postgres [WORM like applications]

2007-05-13 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/12/07 19:49, Dhaval Shah wrote: > Consolidating my responses in one email. > > 1. The total data that is expected is some 1 - 1.5 Tb a day. 75% of > the data comes in a period of 10 hours. Rest 25% comes in the 14 > hours. Of course there are wa

[GENERAL] Postgres Printed Manuals

2007-05-13 Thread Robert James
The Postgres docs are great. Unfortunatelty, at 1600 pages, my printer is a little weary. Are bound & printed editions available? If not, has anyone had any good experience printing them via any of the online services? (The ones I contacted said it was too big for them to print...) Also: woul

Re: [GENERAL] How access table by tableoid

2007-05-13 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > You could possibly do this with a SRF; you'd have to grab the name of > the table and then build a dynamic query off of that. If you cast the > oid to regclass you'll get the name of the table, though you should > probably query pg_class and pg_namespace

Re: [GENERAL] How access table by tableoid

2007-05-13 Thread Jim C. Nasby
On Sun, May 13, 2007 at 09:25:37PM +0200, Felix Kater wrote: > can I use a given tableoid (instead of the tablename) to select > columns from that table somehow? > > SELECT * FROM ??tableoid?? > So, I worked around that by peforming two queries: The first to retrieve > the table's name from pg_c

Re: [GENERAL] Internals of PostgreSQL - Documentation or presentations

2007-05-13 Thread Jim C. Nasby
On Sun, May 13, 2007 at 08:44:48PM +0200, Gerhard Wiesinger wrote: > Are there some presentations or documents of the internals of PostgreSQL > available? > > Especially I'm looking for the concepts and detailed internals of general > transaction handling, internals of commit log, transaction lo

Re: [GENERAL] PITR and tar

2007-05-13 Thread Jim C. Nasby
Moving to -docs... Does anyone know what the history of the docs saying that GNU tar had issues with files changing underneath it? According to this report it's actually BSD tar that has the issue. On Wed, May 09, 2007 at 10:19:05AM -0700, Jeff Davis wrote: > On Wed, 2007-05-09 at 11:40 -0500, Ji

Re: [UNSURE] Re: [GENERAL] autovacuum

2007-05-13 Thread Tom Allison
From what you described, I am running with autovacuum. Makes sense to make a good idea default in the distro builds... On May 13, 2007, at 9:49 AM, Michael Fuhr wrote: On Sat, May 12, 2007 at 03:48:14PM -0400, Tom Allison wrote: I noticed that under 8.2 the autovacuum isn't running (logging)

Re: [GENERAL] How to implement GOMONTH function

2007-05-13 Thread Martijn van Oosterhout
On Sun, May 13, 2007 at 02:26:09PM -0700, Rodrigo De León wrote: > CREATE OR REPLACE FUNCTION > PUBLIC.GOMONTH(DATE, INTEGER, OUT DATE) IMMUTABLE AS > $_$ > SELECT ($1 + ($2 || 'MONTHS')::INTERVAL)::DATE; > $_$ LANGUAGE SQL It would probably be better to use: SELECT ($1 + ($2 * '1 MONTH'::INTERVA

Re: [GENERAL] How to implement GOMONTH function

2007-05-13 Thread Rodrigo De León
Andrus ha escrito: > I need to create function GOMONTH which returns date by given number of > month before or forward using sql or pgsql in 8.1+ > For example, > GOMONTH( DATE '20070513', 1 ) should return date '20070613' > GOMONTH( DATE '20070513

[GENERAL] How access table by tableoid

2007-05-13 Thread Felix Kater
Hi, can I use a given tableoid (instead of the tablename) to select columns from that table somehow? SELECT * FROM ??tableoid?? My first approach was to lauch a subquery of the information_schema like this: SELECT * FROM (SELECT relname FROM pg_class WHERE oid=999) AS tablename However, it tur

[GENERAL] Internals of PostgreSQL - Documentation or presentations

2007-05-13 Thread Gerhard Wiesinger
Hello! Are there some presentations or documents of the internals of PostgreSQL available? Especially I'm looking for the concepts and detailed internals of general transaction handling, internals of commit log, transaction logs, pg_multixact, pg_subtrans, pg_tblspc and pg_twophase. Also s

[Re] Re: [GENERAL] Winsock error 10035 while trying to upgrade from 8.0 to 8.2

2007-05-13 Thread Cyril VELTER
> [EMAIL PROTECTED] wrote : > Cyril VELTER wrote: > > > > I'm trying to upgrade a pretty big database (60G) from postgres 8.0 to > > postgres 8.2 on windows 2000 Server (both version running on the same machine > > on different ports). During the migration process, I always get an error at

Re: [GENERAL] Winsock error 10035 while trying to upgrade from 8.0 to 8.2

2007-05-13 Thread Magnus Hagander
Cyril VELTER wrote: > > I'm trying to upgrade a pretty big database (60G) from postgres 8.0 to > postgres 8.2 on windows 2000 Server (both version running on the same machine > on different ports). During the migration process, I always get an error at > some point (never the same) : Int

Re: [GENERAL] autovacuum

2007-05-13 Thread Michael Fuhr
On Sat, May 12, 2007 at 03:48:14PM -0400, Tom Allison wrote: > I noticed that under 8.2 the autovacuum isn't running (logging) every > 60s like I'm used to seeing. See the 8.2 Release Notes: http://www.postgresql.org/docs/8.2/interactive/release-8-2.html * Remove routine autovacuum server lo

Re: [GENERAL] Indice en Date

2007-05-13 Thread Rodrigo De León
Arturo Munive ha escrito: > tengo un indice sobre una columna date. > > cuando hago una consulta ... > *Select * > id > *from * > ventas > *WHERE * > fecha = date('12-JAN-2007') > > el planificador usa el indice > > pero cuando la restriccion es WHERE fecha < date('12-JAN-2007'

Re: [GENERAL] TWO SAME TABLES, ONE UPDATED. HOW TO SYNC THE OTHER?

2007-05-13 Thread rdeleonp
On May 11, 11:06 pm, "L. Berger" <[EMAIL PROTECTED]> wrote: > Hello > > I havetwotables-- A and B. The structure of both is thesame. Only, > B has many indexes and is used for heavy duty SELECTs. On theother > hand, A only accepts heavy duty INSERTs, so has onlyoneprimary key > index. > > So my DB