Re: [GENERAL] update table with row locking

2004-12-29 Thread Mark
In general I need to lock whole table so only one session can perform update. I'm looking for solution that will work in both C++ and Java. Will 'SELECT FOR UPDATE' lock whole table? As per 'LOCK' will lock released if connection get closed abnormally? ( example: hard crash on the client side,

[GENERAL] BCD format

2004-12-29 Thread stefari
Hi all ! I have to create a table with a BCD formatted field. Can Postrgresql to support this field's type or I have to insert it in binary mode??? Thanks and happy new year to all !!! __ Tiscali Adsl 2 Mega Free: l'adsl piu' veloce

Re: [GENERAL] BCD format

2004-12-29 Thread Joshua D. Drake
[EMAIL PROTECTED] wrote: Hi all ! I have to create a table with a BCD formatted field. Can Postrgresql to support this field's type or I have to insert it in binary mode??? I do not believe PostgreSQL supports BCD by default. However you could created your own type. Sincerely, Joshua D. Drake

Re: [GENERAL] loading only few rows from huge table

2004-12-29 Thread Bruno Wolff III
On Wed, Dec 29, 2004 at 06:54:31 -0800, Mark [EMAIL PROTECTED] wrote: In general you should keep replies copied back to the list so that other people can learn from and contribute to the discussion. Responding to messages in line makes it easier for people to follow the discussion. I will

Re: [GENERAL] update table with row locking

2004-12-29 Thread Bruno Wolff III
On Wed, Dec 29, 2004 at 07:02:51 -0800, Mark [EMAIL PROTECTED] wrote: In general I need to lock whole table so only one session can perform update. I'm looking for solution that will work in both C++ and Java. You probably want to use LOCK. You can read the documention for that command to

Re: [GENERAL] update table with row locking

2004-12-29 Thread Michael Fuhr
On Wed, Dec 29, 2004 at 07:02:51AM -0800, Mark wrote: In general I need to lock whole table so only one session can perform update. I'm looking for solution that will work in both C++ and Java. As I asked in my previous message, what problem are you trying to solve? What's the rationale

Re: [GENERAL] update table with row locking

2004-12-29 Thread Tom Lane
Bruno Wolff III [EMAIL PROTECTED] writes: I believe the locks get released when the backend process terminates. Depending on how the client dies, there may be a significant delay before the backend process terminates. I'd expect a client-application crash to be reported to the backend

Re: [GENERAL] BCD format

2004-12-29 Thread Dann Corbit
Consider using numeric type. Like BCD, it will perform exact decimal arithmetic. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 7:32 AM To: pgsql-general@postgresql.org Subject: [GENERAL] BCD format

[GENERAL] pg_dump and pgpool

2004-12-29 Thread Scott Marlowe
I've noticed today that if one tries to pg_dump a database cluster running under pgpool, one gets the error message: pg_dump: query to get table columns failed: ERROR: kind mismatch between backends HINT: check data consistency between master and secondary Looking at the SQL that pg_dump sends

[GENERAL] debug_print_plan (pg7.4) doesn't seem to do anything

2004-12-29 Thread Eric Brown
I have the following settings: syslog = 2 client_min_messages = notice log_min_messages = debug5 (tried debug1 too) log_error_verbosity = default (tried verbose too, but still doesn't print plan) log_statement = true log_duration = true debug_print_plan = true debug_print_parse = true I thought

[GENERAL] Advice on moving rows to history

2004-12-29 Thread Dave Smith
I am trying to figure out the fastest way to move rows from a current table to a history table. There are currently 150,000 rows of which about 60,000 get moved (monthly). There are multiple queries involved to figure out whether or not a row should be moved, so I am making multiple passes over

Re: [GENERAL] pg_dump and pgpool

2004-12-29 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: I've noticed today that if one tries to pg_dump a database cluster running under pgpool, one gets the error message: pg_dump: query to get table columns failed: ERROR: kind mismatch between backends HINT: check data consistency between master and

[GENERAL] WARNING: group with ID NNN does not exist

2004-12-29 Thread Ed L.
I'm getting the following warning on 8.0beta3: WARNING: group with ID 103 does not exist It is true that I don't have a pg_group.grosysid = 103, but I don't understand why the backend expects it in the first place. Here's an example: % psql -c create user \[EMAIL PROTECTED] CREATE

Re: [GENERAL] debug_print_plan (pg7.4) doesn't seem to do anything

2004-12-29 Thread Tom Lane
Eric Brown [EMAIL PROTECTED] writes: I thought setting debug_print_plan was supposed to explain every query in my log file? I don't see the plan print either. No, it just prints the plan. With settings like yours I get DEBUG: StartTransactionCommand LOG: statement: select 2+2; DEBUG:

Re: [GENERAL] WARNING: group with ID NNN does not exist

2004-12-29 Thread Tom Lane
Ed L. [EMAIL PROTECTED] writes: I'm getting the following warning on 8.0beta3: WARNING: group with ID 103 does not exist It is true that I don't have a pg_group.grosysid = 103, but I don't understand why the backend expects it in the first place. Probably because you had such a

Re: [GENERAL] pg_dump and pgpool

2004-12-29 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Wed, 2004-12-29 at 16:11, Tom Lane wrote: I would like to know exactly what pgpool has done to break pg_dump. What's happening is that there are two databases behind pgpool, and each has managed to assign a different (set of) OID(s) to the table(s).

Re: [GENERAL] pg_dump and pgpool

2004-12-29 Thread Scott Marlowe
On Wed, 2004-12-29 at 16:33, Tom Lane wrote: Scott Marlowe [EMAIL PROTECTED] writes: On Wed, 2004-12-29 at 16:11, Tom Lane wrote: I would like to know exactly what pgpool has done to break pg_dump. What's happening is that there are two databases behind pgpool, and each has managed to

Re: [GENERAL] pgsql question

2004-12-29 Thread Steven Klassen
# I need to to change an ip addres in a plpgsql function from # aaa.bbb.ccc.ddd to an sring containing aaa bbb ccc ddd upload. sklassen= select replace('216.237.145.1'::text, '.', ' ') || ' upload'; ?column? -- 216 237 145 1 upload (1 row) -- Steven Klassen -

Fwd: [GENERAL] Advice on moving rows to history

2004-12-29 Thread Matthew Terenzio
Meant this to go to whole list , sorry for duplicate Begin forwarded message: On Dec 29, 2004, at 4:58 PM, Dave Smith wrote: I am trying to figure out the fastest way to move rows from a current table to a history table. There are currently 150,000 rows of which about 60,000 get moved (monthly).

Re: [GENERAL] BCD format

2004-12-29 Thread Christopher Browne
[EMAIL PROTECTED] wrote: Hi all ! I have to create a table with a BCD formatted field. Can Postrgresql to support this field's type or I have to insert it in binary mode??? Have you considered using a NUMERIC field instead? That supports exact fixed point arithmetic, much like BCD. And I

Re: [GENERAL] pg_dump and pgpool

2004-12-29 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Wed, 2004-12-29 at 16:33, Tom Lane wrote: I'd worry about synchronization issues to start with... I am not worried about that. As long as I'm not doing things like inserting random() into the database, the data in the two backend stores is

Re: [GENERAL] pg_dump and pgpool

2004-12-29 Thread Scott Marlowe
On Wed, 2004-12-29 at 16:56, Tom Lane wrote: Scott Marlowe [EMAIL PROTECTED] writes: On Wed, 2004-12-29 at 16:33, Tom Lane wrote: I'd worry about synchronization issues to start with... I am not worried about that. As long as I'm not doing things like inserting random() into the

Re: [GENERAL] debug_print_plan (pg7.4) doesn't seem to do anything

2004-12-29 Thread Eric Brown
On Dec 29, 2004, at 2:28 PM, Tom Lane wrote: Eric Brown [EMAIL PROTECTED] writes: I thought setting debug_print_plan was supposed to explain every query in my log file? I don't see the plan print either. No, it just prints the plan. With settings like yours I get I don't get the the DEBUG: parse

Re: [GENERAL] debug_print_plan (pg7.4) doesn't seem to do anything

2004-12-29 Thread Tom Lane
Eric Brown [EMAIL PROTECTED] writes: On Dec 29, 2004, at 2:28 PM, Tom Lane wrote: Eric Brown [EMAIL PROTECTED] writes: I thought setting debug_print_plan was supposed to explain every query in my log file? I don't see the plan print either. No, it just prints the plan. With settings like

Re: [GENERAL] pg_dump and pgpool

2004-12-29 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Wed, 2004-12-29 at 16:56, Tom Lane wrote: No, we'd be throwing more, and more complex, queries. Instead of a simple lookup there would be some kind of join, or at least a lookup that uses a multicolumn key. I'm willing to bet the performance

Re: [GENERAL] debug_print_plan (pg7.4) doesn't seem to do anything

2004-12-29 Thread Eric Brown
On Dec 29, 2004, at 3:16 PM, Tom Lane wrote: Eric Brown [EMAIL PROTECTED] writes: On Dec 29, 2004, at 2:28 PM, Tom Lane wrote: Eric Brown [EMAIL PROTECTED] writes: I thought setting debug_print_plan was supposed to explain every query in my log file? I don't see the plan print either. No, it just

[GENERAL] Roadmap for Database Kernel XA Support

2004-12-29 Thread Horst G. Reiterer
Hi, a native application of ours is based on distributed transactions and thus requires all databases to provide an XA interface so that an XA-compliant DTM (e.g. Tuxedo) can do its work. I read in the JDBC driver FAQ (I'm not interested in the JDBC driver itself) at

Re: [GENERAL] pg_dump and pgpool

2004-12-29 Thread Greg Stark
Scott Marlowe [EMAIL PROTECTED] writes: What's happening is that there are two databases behind pgpool, and each has managed to assign a different (set of) OID(s) to the table(s). So, when pg_dump asks for an OID, it gets two different ones. If pgpool is so good at maintaining consistency