Re: [GENERAL] Query timing

2007-03-04 Thread Naz Gassiep
That's not quite as fast as I would like to do it, that throws in a few more steps which slow down the development process. However if there is no way I will persevere with the method I have now. Thanks, - Naz. Jorge Godoy wrote: Naz Gassiep <[EMAIL PROTECTED]> writes: Using EXPLAIN ANALY

Re: [GENERAL] date format

2007-03-04 Thread Tino Wildenhain
Garry Saddington schrieb: I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still rendered in the format (y,m,d) . How can I change this behaviour? regards garry See my answer on the Zope list. The style however influences the way dates are parsed by default, so you nee

Re: [GENERAL] Query timing

2007-03-04 Thread A. Kretschmer
am Mon, dem 05.03.2007, um 15:28:29 +1100 mailte Naz Gassiep folgendes: > Using EXPLAIN ANALYZE I can get the execution time of a query. Is there > a command I can use to get the execution time without the planning Within psql, the command-line-interface, you can use \timing to switch on/off re

Re: [GENERAL] Postgres Replication

2007-03-04 Thread Joshua D. Drake
Mageshwaran wrote: Hi , Is there any way to do replication in postgres.. Please give me any idea to do replication... entering postgresql replication into google brings up: www.commandprompt.com www.greenplum.com (kind of different but sure) And don't forget: www.slony.info And PITR. La

Re: [GENERAL] Query timing

2007-03-04 Thread Jorge Godoy
Naz Gassiep <[EMAIL PROTECTED]> writes: > Using EXPLAIN ANALYZE I can get the execution time of a query. Is there a > command I can use to get the execution time without the planning information? > I just need to time lots of queries that have complex plans and it'd be easier > if I didn't have pa

[GENERAL] Query timing

2007-03-04 Thread Naz Gassiep
Using EXPLAIN ANALYZE I can get the execution time of a query. Is there a command I can use to get the execution time without the planning information? I just need to time lots of queries that have complex plans and it'd be easier if I didn't have pages and pages of planning info between tries.

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Tom Lane
Steve Atkins <[EMAIL PROTECTED]> writes: > On Mar 4, 2007, at 11:18 AM, hubert depesz lubaczewski wrote: >> i read about some replication system for postgresql, but - as far as i >> know there is none real multi-master replication system for >> postgresql. > I don't believe there is, or can be, an

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Steve Atkins
On Mar 4, 2007, at 11:18 AM, hubert depesz lubaczewski wrote: hi, i read about some replication system for postgresql, but - as far as i know there is none real multi-master replication system for postgresql. all i have seen are based on "query replication" with various "hacks" for specific con

[GENERAL] Postgres Replication

2007-03-04 Thread Mageshwaran
Hi , Is there any way to do replication in postgres.. Please give me any idea to do replication... Regards J Mageshwaran ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only by the individual or e

Re: [GENERAL] COPY from and NULL values for double precisions fields

2007-03-04 Thread Andrej Ricnik-Bay
On 3/5/07, Walter Vaughan <[EMAIL PROTECTED]> wrote: For best help it would be good to include your copy statement. As a guess, I'd say you need to include the following in the statement... NULL '' Thanks Walter, I found the cause of my troubles; it wasn't copy, it was the data. I didn't che

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Bill Moran
Stefan Kaltenbrunner <[EMAIL PROTECTED]> wrote: > > Bill Moran wrote: > > Stefan Kaltenbrunner <[EMAIL PROTECTED]> wrote: > >> Bill Moran wrote: > >>> "hubert depesz lubaczewski" <[EMAIL PROTECTED]> wrote: > hi, > i read about some replication system for postgresql, but - as far as i > >>

Re: [GENERAL] COPY from and NULL values for double precisions fields

2007-03-04 Thread Walter Vaughan
Andrej Ricnik-Bay wrote: I'm currently mucking around w/ importing TAB-delimited files; how can I import empty values into a double precision field? COPY complains about nothing between the TABS, about "\N" and other variations, as being "invalid input syntax for type double precision:" For b

[GENERAL] COPY from and NULL values for double precisions fields

2007-03-04 Thread Andrej Ricnik-Bay
Hi Guys, I'm currently mucking around w/ importing TAB-delimited files; how can I import empty values into a double precision field? COPY complains about nothing between the TABS, about "\N" and other variations, as being "invalid input syntax for type double precision:" What *is* valid syntax

Re: [GENERAL] Cannot digest subscribe

2007-03-04 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > I just signed up for the mailing list, but when I tried to change > over to a digest subscription, I got an error back from the server. > The instructions I followed were from http://archives.postgresql.org/ > pgsql-general/ . It looks

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Joshua D. Drake
Well, it's multi-master to the degree that all servers are read/write, and therefore any server can take over. How would you define multi-master? Per the original posts consideration, pgpool would have to be able to deal with constants such as now() and current_date. Can it? Joshua D. Dr

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Joshua D. Drake
hubert depesz lubaczewski wrote: hi, i read about some replication system for postgresql, but - as far as i know there is none real multi-master replication system for postgresql. all i have seen are based on "query replication" with various "hacks" for specific constructions (like now()). my que

Re: [GENERAL] plpgsql and insert

2007-03-04 Thread Andrej Ricnik-Bay
Please say that again in English? On 3/5/07, Jamie Deppeler <[EMAIL PROTECTED]> wrote: Hi, Have a quick question is possible to record a primary from a insert stament eg xprimary := insert into schema.table(.,.,.,.) VALUES (); ---(end of broadcast)--

[GENERAL] plpgsql and insert

2007-03-04 Thread Jamie Deppeler
Hi, Have a quick question is possible to record a primary from a insert stament eg xprimary := insert into schema.table(.,.,.,.) VALUES (); ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] How to capture and handle failed INSERT

2007-03-04 Thread Postgres User
The best answer: RTFM! I found this example in the docs, although it should really exit the Loop after 10 failed attempts instead of going indefinitely: CREATE FUNCTION merge_db(key INT, data TEXT) RETURNS VOID AS $$ BEGIN LOOP UPDATE db SET b = data WHERE a = key; IF found THEN

Re: [GENERAL] How to capture and handle failed INSERT

2007-03-04 Thread Berend Tober
Postgres User wrote: I'm using this code to increment a counter table: IF Exists (SELECT keyfld FROM counter_tbl WHERE key_fld = 'key_val') THEN UPDATE counter_tbl SET counter_fld = counter_fld + 1 WHERE key_fld = 'key_val'; ELSE INSERT INTO counter_tbl(key_fld, counter_fld) VAL

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Devrim GÜNDÜZ
Hi, On Sun, 2007-03-04 at 20:18 +0100, hubert depesz lubaczewski wrote: > anything? anywhere? PGCluster may be the thing that you are looking for. However, if you are looking at something that is similar to Oracle's RAC, it is the PGCluster-II that you are looking for, which is under heavy develo

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Stefan Kaltenbrunner
Bill Moran wrote: > Stefan Kaltenbrunner <[EMAIL PROTECTED]> wrote: >> Bill Moran wrote: >>> "hubert depesz lubaczewski" <[EMAIL PROTECTED]> wrote: hi, i read about some replication system for postgresql, but - as far as i know there is none real multi-master replication system for >

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Bill Moran
Stefan Kaltenbrunner <[EMAIL PROTECTED]> wrote: > > Bill Moran wrote: > > "hubert depesz lubaczewski" <[EMAIL PROTECTED]> wrote: > >> hi, > >> i read about some replication system for postgresql, but - as far as i > >> know there is none real multi-master replication system for > >> postgresql. > >

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Stefan Kaltenbrunner
Bill Moran wrote: > "hubert depesz lubaczewski" <[EMAIL PROTECTED]> wrote: >> hi, >> i read about some replication system for postgresql, but - as far as i >> know there is none real multi-master replication system for >> postgresql. >> all i have seen are based on "query replication" with various

Re: [GENERAL] real multi-master replication?

2007-03-04 Thread Bill Moran
"hubert depesz lubaczewski" <[EMAIL PROTECTED]> wrote: > > hi, > i read about some replication system for postgresql, but - as far as i > know there is none real multi-master replication system for > postgresql. > all i have seen are based on "query replication" with various "hacks" > for specific

[GENERAL] How to capture and handle failed INSERT

2007-03-04 Thread Postgres User
Hi, I'm using this code to increment a counter table: IF Exists (SELECT keyfld FROM counter_tbl WHERE key_fld = 'key_val') THEN UPDATE counter_tbl SET counter_fld = counter_fld + 1 WHERE key_fld = 'key_val'; ELSE INSERT INTO counter_tbl(key_fld, counter_fld) VALUES('key_val', 1)

Re: [GENERAL] date format

2007-03-04 Thread Raymond O'Donnell
On 04/03/2007 19:26, Raymond O'Donnell wrote: Ahh! Then you need to use to_char(). The datestyle setting in http://www.postgresql.org/docs/8.2/static/functions-formatting.html --- Raymond O'Donnell, Director of Music, Galway Cathedra

Re: [GENERAL] date format

2007-03-04 Thread Raymond O'Donnell
On 04/03/2007 18:56, Garry Saddington wrote: # select now(); now --- 2007-03-04 18:07:54.626267+01 (1 row) Which is precisely what I expect. Which is precisely what I get, but I want 04-03-2007. Ahh! Then you need to use to_char(). The datestyle set

Re: [GENERAL] supporting 2000 simultaneous connections.

2007-03-04 Thread Joris Dobbelsteen
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Shiva Sarna >Sent: vrijdag 2 maart 2007 6:03 >To: Bill Moran; Joshua D. Drake >Cc: Shiva Sarna; pgsql-general@postgresql.org >Subject: Re: [GENERAL] supporting 2000 simultaneous connections. > >Hi, > >Than

[GENERAL] real multi-master replication?

2007-03-04 Thread hubert depesz lubaczewski
hi, i read about some replication system for postgresql, but - as far as i know there is none real multi-master replication system for postgresql. all i have seen are based on "query replication" with various "hacks" for specific constructions (like now()). my question is - is there any (even full

Re: [GENERAL] date format

2007-03-04 Thread Garry Saddington
On Sunday 04 March 2007 17:09, Martijn van Oosterhout wrote: > On Sun, Mar 04, 2007 at 05:05:44PM +, Garry Saddington wrote: > > On Sunday 04 March 2007 16:16, Raymond O'Donnell wrote: > > > On 04/03/2007 16:16, Garry Saddington wrote: > > > > I tried pgAdmin3 on windows to run 'select now()'

Re: [GENERAL] Support for idempotent schema changes?

2007-03-04 Thread Joshua D. Drake
David Lowe wrote: Within the context of a script, executing: Begin Statement1 Statement2 Statement3 Commit Where I only wish to commit if the error is specific to the object already existing, and rollback for all other errors, what's the best way to accomplish that? You would have to put eac

Re: [GENERAL] Configure can't find com_err on OpenBSD for --with-krb5

2007-03-04 Thread Tom Lane
Jim Rosenberg <[EMAIL PROTECTED]> writes: > Here's the problem: when configure tries to compile the code snippet to > check for com_err, it needs to do this with -lcrypto added, but it's not > using that. What's the "right" way to fix this? I could probably get it to > work by brutally hacking c

Re: [GENERAL] date format

2007-03-04 Thread Joshua D. Drake
Garry Saddington wrote: I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still rendered in the format (y,m,d) . How can I change this behaviour? Did you restart PostgreSQL after making the change? You can also set it on the fly per session. Joshua D. Drake rega

[GENERAL] pljava on mac

2007-03-04 Thread Eddy D. Sanchez
Someone works with pljava under postgresql on mac? I'm trying to install on OSX 10.4.8 but I cant compile this. Is there somebody that can copy me its compiles libraries ? ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please s

Re: [GENERAL] Can I getting a unique ID from a select

2007-03-04 Thread Timasmith
On Mar 3, 7:12 pm, [EMAIL PROTECTED] (Bruno Wolff III) wrote: > On Thu, Mar 01, 2007 at 06:16:02 -0800, > Timasmith<[EMAIL PROTECTED]> wrote: > > > I am using hibernate, using a view like a read only table and I need a > > primary key each time a select is issued. > > > create view myview as > > s

Re: [GENERAL] Support for idempotent schema changes?

2007-03-04 Thread David Lowe
Within the context of a script, executing: Begin Statement1 Statement2 Statement3 Commit Where I only wish to commit if the error is specific to the object already existing, and rollback for all other errors, what's the best way to accomplish that? -Original Message- From: Peter Eisentr

Re: [GENERAL] date format

2007-03-04 Thread Martijn van Oosterhout
On Sun, Mar 04, 2007 at 05:05:44PM +, Garry Saddington wrote: > On Sunday 04 March 2007 16:16, Raymond O'Donnell wrote: > > On 04/03/2007 16:16, Garry Saddington wrote: > > > I tried pgAdmin3 on windows to run 'select now()' and it still does not > > > return the correct datestyle. > > > > Pro

Re: [GENERAL] date format

2007-03-04 Thread Garry Saddington
On Sunday 04 March 2007 16:16, Raymond O'Donnell wrote: > On 04/03/2007 16:16, Garry Saddington wrote: > > I tried pgAdmin3 on windows to run 'select now()' and it still does not > > return the correct datestyle. > > Probably a silly question, but did you remember to restart the server > after cha

[GENERAL] Cannot digest subscribe

2007-03-04 Thread Don Lavelle
Hi all, I just signed up for the mailing list, but when I tried to change over to a digest subscription, I got an error back from the server. The instructions I followed were from http://archives.postgresql.org/ pgsql-general/ . From the few e-mails I've gotten so far, it looks like this

[GENERAL] how to pass an array to the plpgsql function from Java Code

2007-03-04 Thread Sandeep Kumar Jakkaraju
how to pass an array to the plpgsql function from Java Code ?? say from a JDBC preparedStatement Example :- create or replace function test( x integer[] ) returns integer as $BODY$ BEGIN RETURN x[0]; END ; language 'plpgsql' JDBC CODE :- int [] ar = {1,2,3}; PreparedStament pre= connec

Re: [GENERAL] xpath and xml namespaces

2007-03-04 Thread Nikolay Samokhvalov
On 3/4/07, Peter Schonefeld <[EMAIL PROTECTED]> wrote: Hi, i'm having trouble getting xpath in Postgres 8.2 to recognise xml namespaces...could someone please point me to a good reference for the xml2 lib? This is FAQ-like question. The thing is that XPath spec doesn't define any default mappin

Re: [GENERAL] date format

2007-03-04 Thread Raymond O'Donnell
On 04/03/2007 16:16, Garry Saddington wrote: I tried pgAdmin3 on windows to run 'select now()' and it still does not return the correct datestyle. Probably a silly question, but did you remember to restart the server after changing the datestyle setting? Ray. -

Re: [GENERAL] issue with select currval

2007-03-04 Thread Shane Ambler
Alain Roger wrote: Hi, I have a table "photo" where my primary key is name "photo_id" (only serial value is stored there). when i type : select currval('photo_photo_id_seq'); the answer is : ERROR: relation "photo_photo_id_seq" does not exist whereas the "relation photo_photo_id_seq" exists

Re: [GENERAL] date format

2007-03-04 Thread Garry Saddington
On Sunday 04 March 2007 15:28, Raymond O'Donnell wrote: > On 04/03/2007 12:58, Jorge Godoy wrote: > > Garry Saddington <[EMAIL PROTECTED]> writes: > >> I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is > >> still rendered in the format (y,m,d) . How can I change this behaviou

Re: [GENERAL] date format

2007-03-04 Thread Raymond O'Donnell
On 04/03/2007 12:58, Jorge Godoy wrote: Garry Saddington <[EMAIL PROTECTED]> writes: I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still rendered in the format (y,m,d) . How can I change this behaviour? ISO means y-m-d... The default postgresql.conf that is ins

[GENERAL] issue with select currval

2007-03-04 Thread Alain Roger
Hi, I have a table "photo" where my primary key is name "photo_id" (only serial value is stored there). when i type : select currval('photo_photo_id_seq'); the answer is : ERROR: relation "photo_photo_id_seq" does not exist whereas the "relation photo_photo_id_seq" exists So where is the pro

Re: [GENERAL] Configure can't find com_err on OpenBSD for --with-krb5

2007-03-04 Thread Jim Rosenberg
--On Sunday, March 4, 2007 12:40 AM -0500 Tom Lane <[EMAIL PROTECTED]> wrote: You need to look at the config.log output to see exactly what configure tried to do and what error it got. Thanks, Tom, this was helpful!! Here's the problem: when configure tries to compile the code snippet to ch

[GENERAL] xpath and xml namespaces

2007-03-04 Thread Peter Schonefeld
Hi, i'm having trouble getting xpath in Postgres 8.2 to recognise xml namespaces...could someone please point me to a good reference for the xml2 lib? Cheers Pete

Re: [GENERAL] postgresql vs mysql

2007-03-04 Thread Andreas 'ads' Scherbaum
On Fri, 23 Feb 2007 13:49:06 +1300 "Andrej Ricnik-Bay" <[EMAIL PROTECTED]> wrote: > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > > That depends greatly on what you're doing with it. Generally, as soon > > as you start throwing a multi-user workload at it, MySQL stops > > scaling. http://twea

Re: [GENERAL] postgresql vs mysql

2007-03-04 Thread Andreas 'ads' Scherbaum
Hello all, On Wed, 21 Feb 2007 10:02:04 -0600 Scott Marlowe <[EMAIL PROTECTED]> wrote: > It swallows column level foreign key contraints and does nothing with > them, no errors nothing, even if you're defining innodb tables. I.e. > this produces not errors: > > mysql> create table a (id int pr

Re: [GENERAL] postgresql vs mysql

2007-03-04 Thread Andreas 'ads' Scherbaum
Hello, On Thu, 22 Feb 2007 00:16:24 +0800 Lincoln Yeoh wrote: > Want transactions? Use innoDB. Want to restore a multi-gigabyte > database fast from backups, sure use MyISAM (too many people seem to > have probs doing that with innoDB). sure you want to do this? http://bugs.mysql.com/bug.ph

Re: [GENERAL] postgresql vs mysql

2007-03-04 Thread Andreas 'ads' Scherbaum
On Thu, 22 Feb 2007 17:14:11 -0600 Jim Nasby <[EMAIL PROTECTED]> wrote: > On Feb 20, 2007, at 11:59 PM, Adam Rich wrote: > > "As of 5.0.2, the server requires that month and day values > > be legal, and not merely in the range 1 to 12 and 1 to 31, > > respectively." > > Yes, but any session is fr

Re: [GENERAL] date format

2007-03-04 Thread Jorge Godoy
Garry Saddington <[EMAIL PROTECTED]> writes: > I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is > still > rendered in the format (y,m,d) . How can I change this behaviour? ISO means y-m-d... -- Jorge Godoy <[EMAIL PROTECTED]> ---(end of

Re: [GENERAL] PG Dump 8.2

2007-03-04 Thread Leonel Nunez
> Joshua D. Drake wrote: >> Mikko Partio wrote: >> >>> Laurent ROCHE wrote: >>> Hi, Does anyone know if Ubuntu 6.10 (LTS) has packages for PostgreSQL 8.2, from a recommandable place ? I can not recommend my clients to use 8.2 if there's nobody supporting the packa

Re: [GENERAL] Can I getting a unique ID from a select

2007-03-04 Thread Bruno Wolff III
On Sat, Mar 03, 2007 at 18:12:19 -0600, Bruno Wolff III <[EMAIL PROTECTED]> wrote: > On Thu, Mar 01, 2007 at 06:16:02 -0800, > Timasmith <[EMAIL PROTECTED]> wrote: > > I am using hibernate, using a view like a read only table and I need a > > primary key each time a select is issued. > > > > c

[GENERAL] date format

2007-03-04 Thread Garry Saddington
I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still rendered in the format (y,m,d) . How can I change this behaviour? regards garry ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropr

Re: [GENERAL] Support for idempotent schema changes?

2007-03-04 Thread Flemming Frandsen
Peter Eisentraut wrote: You just ignore the error if the object already exists. I'd advice against that or at least make sure that only "the thing already exists" errors get ignored. Because otherwise it's 100% impossible to discover any real problems with the scripts. -- Regards Flemmin

Re: [GENERAL] Interface to posgresql

2007-03-04 Thread Shane Ambler
[EMAIL PROTECTED] wrote: Thanks Shane, I appreciate your help. I have installed postgresql on windows and there is no /urs/lib and > /urs/include folder in this installation. Can you please tell me > why is that and what is the difference in the windwos and > linux intallations With windows th

Re: [GENERAL] Configure can't find com_err on OpenBSD for --with-krb5

2007-03-04 Thread Stefan Kaltenbrunner
Jim Rosenberg wrote: > --On Saturday, March 3, 2007 11:24 PM -0500 Tom Lane <[EMAIL PROTECTED]> > wrote: > >>> I am trying to build PostgreSQL 8.2.3 on OpenBSD 4.0. When I give the >>> command >> >>> ./configure -v --with-openssl --with-krb5 >>> --with-includes=/usr/include/kerberosV >> >>> I get: