Re: [GENERAL] How to DB export XML File in PostgreSQL?

2009-07-16 Thread Steve Choi
Hello. Thank you for your interesting. Any person know that how to db export XML file in PostgreSQL? I use Ver. 8.4 and Operating System Linux. Have a nice day. I'm not sure I understand your question. Do you want to export the data of your database into a (single?) XML file, or do you want to

Re: [GENERAL] [PERFORM] Concurrency issue under very heay loads

2009-07-16 Thread Scott Marlowe
On Wed, Jul 15, 2009 at 10:59 PM, Raji Sridar (raji)r...@cisco.com wrote: Hi, We use a typical counter within a transaction to generate order sequence number and update the next sequence number. This is a simple next counter - nothing fancy about it.  When multiple clients are concurrently

Re: [GENERAL] Function does not exist

2009-07-16 Thread dipesh mistry (Imap)
Hello, In my function i had defined addnewuser(integer,character,..), and i call this function by Java code. I had created function with integer datatype but database always gives me error, org.postgresql.util.PSQLException: ERROR: function addnewuser(bigint,character varying,)

[GENERAL] Using the GEQO

2009-07-16 Thread Ms swati chande
Hi,   I have a few queries on the use of the geqo.   1. Since the value of geqo_threshold is12, does the geqo get automatically activated for queries with 12 or more joins? 2. Can the geqo threshold be set to a smaller value like 4 or 5? 3. How do we come to know whether the geqo has been used to

Re: [GENERAL] initdb --locale=LATIN1 fails on Windows

2009-07-16 Thread Peter Eisentraut
On Wednesday 15 July 2009 23:02:47 Abraham, Danny wrote: Actually the command is:initdb --encoding=LATIN1. It fails on Windos. fails on Windows The same command worked fine on PG 8.2.4. Now, using 8.3.7, the command succeeds only with encoding 1252. It comments something on wrong

Re: [GENERAL] How to DB export XML File in PostgreSQL?

2009-07-16 Thread Peter Eisentraut
On Thursday 16 July 2009 09:03:09 Steve Choi wrote: Hello. Thank you for your int If I queryed on PostgreSQL, SELECT Item_ID FROM Engine, I want to export the result to Single XML file. How can I make it? Have a nice day. Thank you for your answer. :)

Re: [GENERAL] initdb --encoding=LATIN1 fails on Windows

2009-07-16 Thread Abraham, Danny
Thanks. I guess my question is then, how should I configure Windows to have the right locale so that I can create a LATIN1 encoding cluster. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] psql \du

2009-07-16 Thread Andreas Wenk
Peter Eisentraut schrieb: On Thursday 16 July 2009 02:12:05 ANdreas Wenk wrote: Hi, I recognized in psql using the internal help (\?) that the *+* sign is missing for the shortcut \du: # \du List of roles Role name | Attributes | Member of

Re: [GENERAL] best practice transitioning from one datatype to another

2009-07-16 Thread Andreas Wenk
Arndt Lehmann schrieb: On Jul 16, 8:05 am, t...@sss.pgh.pa.us (Tom Lane) wrote: CG cgg...@yahoo.com writes: While transitioning from 8.1 to 8.4, I need to transition to the internal UUID type in place of the contrib/uniqueidentifier module. I've built the database around uniqueidentifier, so

[GENERAL] Getting list of tables used within a query

2009-07-16 Thread Marek Lewczuk
Hi, for need of our application we need to get list of tables, that are used within given SELECT query - we need them in order to track changes of the data, that may be returned by the query - it is some kind of caching mechanism, that checks db data modifications. Right now we create a temporary

[GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello We have a C function that works without problems when we use it with postgresql 8.3 (32/64bit) and with postgreSQL 8.4 (32bit). But with 8.4 in a 64bit server, postgresql generates this error when we try to install the function: ERROR:

Re: [GENERAL] [PERFORM] Concurrency issue under very heay loads

2009-07-16 Thread Albe Laurenz
Raji Sridar wrote: We use a typical counter within a transaction to generate order sequence number and update the next sequence number. This is a simple next counter - nothing fancy about it. When multiple clients are concurrently accessing this table and updating it, under extermely

[GENERAL] overwrite the encoding of a database

2009-07-16 Thread Massa, Harald Armin
Hello, I have an old PostgreSQL Database which was created with encoding = SQL_ASCII. That is an old sin of mine; 9years ago I did not know better. Now I know better than to use SQL_ASCII. On the bright side: I am totally sure that the TEXT within that database is in WIN1252 / CP1252 encoding.

Re: [GENERAL] overwrite the encoding of a database

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 10:53:37 Massa, Harald Armin wrote: Hello, I have an old PostgreSQL Database which was created with encoding = SQL_ASCII. That is an old sin of mine; 9years ago I did not know better. Now I know better than to use SQL_ASCII. On the bright side: I am totally sure

[GENERAL] Working around spurious unique constraint errors due to SERIALIZABLE bug

2009-07-16 Thread Florian Weimer
SERIALIZABLE isolation level doesn't really conform to the spec because it doesn't deal with phantoms. The only case I've come across where this actually matters is when you're implementing some sort of insert into table if not yet present operation. This will typically result in a unique

Re: [GENERAL] Using the GEQO

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 09:02:53 Ms swati chande wrote: 1. Since the value of geqo_threshold is12, does the geqo get automatically activated for queries with 12 or more joins? No, not directly. It will get used for 12 joins with no predefined order. This is a bit complicated by the fact

[GENERAL] Autovacuum and pg_stat_reset()

2009-07-16 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello We are playing around with different statistics provided by postgresql to get a better overview of our systems. Until postgresql 8.2, and the presence of 'stats_reset_on_server_start=on' + pg_postmaster_start_time(), we could calculate very

Re: [GENERAL] [PERFORM] Concurrency issue under very heay loads

2009-07-16 Thread Allan Kamau
May be a simple way would be to use a SEQUENCE database object. And call nextval('your_sequence') to obtain the next unique value (of type bigint). According to PG docs http://www.postgresql.org/docs/8.4/interactive/functions-sequence.html;, the sequence object has functions that provide simple,

Re: [GENERAL] best practice transitioning from one datatype to another

2009-07-16 Thread Arndt Lehmann
On Jul 16, 5:46 pm, a.w...@netzmeister-st-pauli.de (Andreas Wenk) wrote: Arndt Lehmann schrieb: On Jul 16, 8:05 am, t...@sss.pgh.pa.us (Tom Lane) wrote: CG cgg...@yahoo.com writes: While transitioning from 8.1 to 8.4, I need to transition to the internal UUID type in place of the

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Peter Eisentraut
On Thursday 16 July 2009 12:14:48 Rafael Martinez wrote: ERROR: incompatible library /usr/local/lib/pg_uname_8.4.so: magic block mismatch DETAIL: Server has FLOAT8PASSBYVAL = true, library has false. You need to recompile your module. -- Sent via pgsql-general mailing list

Re: [GENERAL] Function does not exist

2009-07-16 Thread Pavel Stehule
2009/7/16 dipesh mistry (Imap) dipesh.mis...@mobilefundas.com: Hello, In my function i had defined addnewuser(integer,character,..), and i call this function by Java code. I had created function with integer datatype but database always gives me error,

[GENERAL] suggestion: log_statement = sample

2009-07-16 Thread Janning Vygen
hi, http://archives.postgresql.org/pgsql-general/2009-03/msg00581.php This was my suggestion about introducing a statment to get a sample of SQL statements. Nobody answered yet. Why not? i think my suggestion would help a lot. Or was it kind of stupid? kind regards Janning -- Sent via

Re: [GENERAL] psql \du

2009-07-16 Thread Peter Eisentraut
On Thursday 16 July 2009 02:12:05 ANdreas Wenk wrote: Hi, I recognized in psql using the internal help (\?) that the *+* sign is missing for the shortcut \du: # \du List of roles Role name | Attributes | Member of --+--+--- # \du+

Re: [GENERAL] Concurrency issue under very heay loads

2009-07-16 Thread Bill Moran
Raji Sridar (raji) r...@cisco.com wrote: We use a typical counter within a transaction to generate order sequence number and update the next sequence number. This is a simple next counter - nothing fancy about it. When multiple clients are concurrently accessing this table and updating

Re: [GENERAL] Getting list of tables used within a query

2009-07-16 Thread Pavel Stehule
Hello you need analyze execution plan - parser does know nothing about table order. look on EXPLAIN statement regards Pavel Stehule -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter Eisentraut wrote: On Thursday 16 July 2009 12:14:48 Rafael Martinez wrote: ERROR: incompatible library /usr/local/lib/pg_uname_8.4.so: magic block mismatch DETAIL: Server has FLOAT8PASSBYVAL = true, library has false. You need to

Re: [GENERAL] Function does not exist

2009-07-16 Thread Andreas Wenk
Pavel Stehule schrieb: 2009/7/16 dipesh mistry (Imap) dipesh.mis...@mobilefundas.com: Hello, In my function i had defined addnewuser(integer,character,..), and i call this function by Java code. I had created function with integer datatype but database always gives me error,

Re: [GENERAL] Function does not exist

2009-07-16 Thread Pavel Stehule
2009/7/16 Andreas Wenk a.w...@netzmeister-st-pauli.de: Pavel Stehule schrieb: 2009/7/16 dipesh mistry (Imap) dipesh.mis...@mobilefundas.com: Hello, In my function i had defined addnewuser(integer,character,..), and i call this function by Java code. I had created function with

Re: [GENERAL] Function does not exist

2009-07-16 Thread Andreas Wenk
Pavel Stehule schrieb: 2009/7/16 Andreas Wenk a.w...@netzmeister-st-pauli.de: Pavel Stehule schrieb: 2009/7/16 dipesh mistry (Imap) dipesh.mis...@mobilefundas.com: Hello, In my function i had defined addnewuser(integer,character,..), and i call this function by Java code. I had created

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Marko Kreen
On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Peter Eisentraut wrote: On Thursday 16 July 2009 12:14:48 Rafael Martinez wrote: ERROR: incompatible library /usr/local/lib/pg_uname_8.4.so: magic block mismatch DETAIL: Server has FLOAT8PASSBYVAL = true, library has false.

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marko Kreen wrote: On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Peter Eisentraut wrote: You need to recompile your module. We recompile the module automatically when a new postgres cluster gets installed. The module has

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Marko Kreen
On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Marko Kreen wrote: On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Peter Eisentraut wrote: You need to recompile your module. We recompile the module automatically when a new postgres cluster gets

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Rafael Martinez
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marko Kreen wrote: On 7/16/09, Rafael Martinez r.m.guerr...@usit.uio.no wrote: Any other ideas? The version you compile against is not the version you have running. Well, the only version I have installed on this server is 8.4.0

Re: [GENERAL] suggestion: log_statement = sample

2009-07-16 Thread Bill Moran
In response to Janning Vygen vy...@kicktipp.de: hi, http://archives.postgresql.org/pgsql-general/2009-03/msg00581.php This was my suggestion about introducing a statment to get a sample of SQL statements. Nobody answered yet. Why not? i think my suggestion would help a lot. Or was it

Re: [GENERAL] Working around spurious unique constraint errors due to SERIALIZABLE bug

2009-07-16 Thread Albe Laurenz
Florian Weimer wrote: SERIALIZABLE isolation level doesn't really conform to the spec because it doesn't deal with phantoms. The only case I've come across where this actually matters is when you're implementing some sort of insert into table if not yet present operation. This will typically

Re: [GENERAL] Using the geqo

2009-07-16 Thread Ms swati chande
Thanks Andres, 1. Since the value of geqo_threshold is 12, does the geqo get automatically activated for queries with 12 or more joins? No, not directly. It will get used for 12 joins with no predefined order. This is a bit complicated by the fact that even a predefined order like: a JOIN b

Re: [GENERAL] suggestion: log_statement = sample

2009-07-16 Thread Janning Vygen
hi, thanks for your comments on this. On Thursday 16 July 2009 15:05:58 you wrote: In response to Janning Vygen vy...@kicktipp.de: hi, http://archives.postgresql.org/pgsql-general/2009-03/msg00581.php This was my suggestion about introducing a statment to get a sample of SQL

[GENERAL] Please help

2009-07-16 Thread Roseller A. Romanos
Please help me with this. I really need your advice as to how to retrieve the data in my postgresql database. I have postgresql installed in Windows XP platform five months ago. Just yesterday my OS bugged down and saying NTDLR is missing. What I did was I re-installed my OS. When I finished my

Re: [GENERAL] Asking for assistance in determining storage requirements

2009-07-16 Thread Alan McKay
No other takers on this one? I'm wondering what exactly direct attached storage entails? At PG Con I heard a lot about using only direct-attached storage, and not a SAN. Are there numbers to back this up? Does fibre-channel count as direct-attached storage? I'm thinking it would. What

Re: [GENERAL] Working around spurious unique constraint errors due to SERIALIZABLE bug

2009-07-16 Thread Florian Weimer
* Albe Laurenz: SELECT COUNT(id) INTO i2 FROM a WHERE id = i; IF i2 = 0 THEN /* This INSERT will never throw an exception if the transactions are truly serialized */ INSERT INTO a (id) VALUES (i); RETURN TRUE; ELSE RETURN FALSE; END IF; This

[GENERAL] Create (function, procedure) and trigger to increment a counter

2009-07-16 Thread Chris Barnes
I have a table usage, I would like to create a (function or procedure) called by the trigger to increment column counter after an update. Can someone lend me a hand with the process behind creating this function,procedure and trigger. Table public.usage Column |

Re: [GENERAL] Please help

2009-07-16 Thread Yuriy Rusinov
Hello, Roseller ! What should I do to access my database and retrieve the important records in it? Possible you should keep files in database cluster, recreate db cluster and put your old files into newly created cluster. -- Best regards, Sincerely yours, Yuriy Rusinov. -- Sent via

Re: [GENERAL] Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux

2009-07-16 Thread Alvaro Herrera
Rafael Martinez wrote: This is the Makefile we use: - --- PG_SRC=/usr/local/src PG_LIB=/usr/local/lib SERVER_INCLUDES += -I $(shell /local/opt/pgsql-8.4/bin/pg_config - --includedir) SERVER_INCLUDES += -I $(shell /local/opt/pgsql-8.4/bin/pg_config -

[GENERAL] something to suggest indexes

2009-07-16 Thread John
Hi, Is there something built-in to Postgres that would suggest what indexes I might add to improve performance? I created my required tables (they only contain small amounts of test data) and the performance is great. But as the data starts growing I'm betting that creating a few indexes

Re: [GENERAL] best practice transitioning from one datatype to another

2009-07-16 Thread CG
Trying to fix a dump file ... cat backup.sql | sed -e s/uniqueidentifier/uuid/g backup_fixed.sql ... gives me a dump that won't import. It is hard digging through 30+ gigs of text data to find where sed ate a field delimiter, so I'm going to give Tom's idea a try. I didn't even know the ALTER

Re: [GENERAL] [PERFORM] Incr/Decr Integer

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 19:56:47 William Scott Jordan wrote: Hey all! Is there a better way to increase or decrease the value of an integer than doing something like: --- UPDATE the_table SET the_int = the_int + 1 WHERE the_id = 123 ; --- We seem to be getting a lot of deadlocks using

[GENERAL] Error in insert statement

2009-07-16 Thread Relyea, Mike
I need help understanding what I'm doing wrong with an insert statement. I'm running 8.3.7 on Windows and the DB is complaining about the select statement in my insert statement. I'm trying to execute DROP TABLE IF EXISTS tblTempSpecs; CREATE TEMP TABLE tblTempSpecs AS SELECT

Re: [GENERAL] Error in insert statement

2009-07-16 Thread Thomas Kellerer
Relyea, Mike wrote on 16.07.2009 21:40: I need help understanding what I'm doing wrong with an insert statement. I'm running 8.3.7 on Windows and the DB is complaining about the select statement in my insert statement. When using a SELECT for an INSERT the values part is not needed in fact its

Re: [GENERAL] Error in insert statement

2009-07-16 Thread bricklen
Try dropping the word VALUES. eg. INSERT INTO tblSpecs (CartridgeTypeID, ColorID, TestTypeID,ZoneID, PaperID, AttributeID, Spec) SELECT CartridgeTypeID, ColorID, TestTypeID,ZoneID, PaperID, AttributeID,Spec from tblTempSpecs; On Thu, Jul 16, 2009 at 12:40 PM, Relyea, Mikemike.rel...@xerox.com

Re: [GENERAL] Error in insert statement

2009-07-16 Thread Relyea, Mike
From: bricklen [mailto:brick...@gmail.com] Sent: Thursday, July 16, 2009 4:05 PM To: Relyea, Mike Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Error in insert statement Try dropping the word VALUES. eg. INSERT INTO tblSpecs (CartridgeTypeID, ColorID, TestTypeID,ZoneID,

Re: [GENERAL] Error in insert statement

2009-07-16 Thread Relyea, Mike
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Thomas Kellerer Sent: Thursday, July 16, 2009 4:05 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Error in insert statement Relyea, Mike wrote on 16.07.2009 21:40: I need help

Re: [GENERAL] Concurrency issue under very heay loads

2009-07-16 Thread Greg Smith
On Wed, 15 Jul 2009, Raji Sridar (raji) wrote: When multiple clients are concurrently accessing this table and updating it, under extermely heavy loads in the system (stress testing), we find that the same order number is being generated for multiple clients. The only clean way to generate

Re: [GENERAL] Areca 1680 and RHEL/Centos 5.3 issue

2009-07-16 Thread Greg Smith
On Wed, 15 Jul 2009, Scott Marlowe wrote: About two months ago I updated one of our to servers to 5.3, and the new kernel is 2.6.18-128.1.14.el5. I had nothing but trouble on my one system with an Areca ARC-1210 using the 2.6.18-92 kernel from 5.2 you said worked fine for you. The problem I

Re: [GENERAL] [PERFORM] Incr/Decr Integer

2009-07-16 Thread William Scott Jordan
Hi Andrew, That's a very good guess. We are in fact updating this table multiple times within the same triggered function, which is being called on an INSERT. Essentially, we're using this to keep a running total of the number of rows being held in another table. The function we're using

Re: [GENERAL] [PERFORM] Incr/Decr Integer

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 23:20:34 William Scott Jordan wrote: Hi Andrew, That's a very good guess. We are in fact updating this table multiple times within the same triggered function, which is being called on an INSERT. Essentially, we're using this to keep a running total of the number

Re: [GENERAL] [PERFORM] Incr/Decr Integer

2009-07-16 Thread William Scott Jordan
Hi Andrew, That's a very good guess. We are in fact updating this table multiple times within the same triggered function, which is being called on an INSERT. Essentially, we're using this to keep a running total of the number of rows being held in another table. The function we're using