Re: [GENERAL] Deadlock Detected (revisited)

2005-11-25 Thread Wes
On 11/25/05 9:12 PM, "Stephan Szabo" <[EMAIL PROTECTED]> wrote: > The latter, the row locks before were single owner and were such that a > second lock request for the same row would wait for the first to be > released. Now effectively you have two levels of locks at the row level, > the weaker of

Re: [GENERAL] Deadlock Detected (revisited)

2005-11-25 Thread Stephan Szabo
On Fri, 25 Nov 2005, Wes wrote: > On 11/25/05 2:40 AM, "Stephan Szabo" <[EMAIL PROTECTED]> wrote: > > > 8.1 should be using the new shared row locks for doing the checks. This > > should fix the case mentioned. > > Hmm. I'm looking in the "What's new" for 8.1 and see that now. I could > have sw

Re: [GENERAL] Deadlock Detected (revisited)

2005-11-25 Thread Wes
On 11/25/05 2:40 AM, "Stephan Szabo" <[EMAIL PROTECTED]> wrote: > 8.1 should be using the new shared row locks for doing the checks. This > should fix the case mentioned. Hmm. I'm looking in the "What's new" for 8.1 and see that now. I could have sworn it wasn't there the last time I looked.

Re: [GENERAL] Function name variable within a non-trigger function

2005-11-25 Thread Michael Fuhr
On Thu, Nov 24, 2005 at 10:44:19AM -0500, Berend Tober wrote: > I know that within a trigger function the functin name can be referenced > by the special variable TG_NAME, so I could include raise an exception > that identified its source with a line like: > > RAISE EXCEPTION ''ERROR IN %''

Re: [GENERAL] howto create dynamic table name in plpgsql function.

2005-11-25 Thread Jaime Casanova
On 11/25/05, Thies C. Arntzen <[EMAIL PROTECTED]> wrote: > hello, > > i have a table with documents that have an id and belong to a pool: > (the sample tables have no indices, i know) > > > Table "public.asset" > Column | Type | Modifiers > --+-+--- > asset_id |

[GENERAL] howto create dynamic table name in plpgsql function.

2005-11-25 Thread Thies C. Arntzen
hello, i have a table with documents that have an id and belong to a pool: (the sample tables have no indices, i know) Table "public.asset" Column | Type | Modifiers --+-+--- asset_id | integer | pool_id | integer | content | text| each pool belongs to

[GENERAL] Can this pl/pgsql be simplified?

2005-11-25 Thread CSN
I have a trigger function that simply updates item counts when the items table changes (member_id or active changes). I'm curious if this bit of the code can be simplified? :) thanks csn ELSIF TG_OP = 'UPDATE' THEN IF (OLD.member_id is NULL and NEW.member_id is not null) or (OLD.member_id i

Re: [GENERAL] pg_connect troubles on localhost

2005-11-25 Thread John Taber
Hmmm, I have no idea what the Apache daemon user is(root?) but not sure how to check. So what would be the workaround ? Should I setup users as different from OS user names ? Tom Lane wrote: John Taber <[EMAIL PROTECTED]> writes: # TYPE DATABASEUSERCIDR-ADDRESS METHOD

Re: [GENERAL] Regular expressions w localization problem

2005-11-25 Thread Manuel Sugawara
Tom Lane <[EMAIL PROTECTED]> writes: > I believe the meanings of [[:upper:]] and friends depend on the > database locale, Indeed they depend on the locale settings, that's why this used to work. > and the current code for them probably doesn't work at all in > multibyte database encodings eithe

Re: [GENERAL] Regular expressions w localization problem

2005-11-25 Thread Tom Lane
Manuel Sugawara writes: > I'm facing a problem I have seen before but never got the time to > report until now that is biting me again. I have a table which has > some CHECK constrains using regular expressions and one check is > failing when I try to insert some valid data. The constraint > defin

[GENERAL] Resend: Question about PostgreSQL, pgpool, and Postfix

2005-11-25 Thread Gregory Youngblood
[I don't know if this message made it out before or not. If it did, please accept my apologies for the duplicate message. Thanks.] I'm running postfix 2.0.18 with a postgresql 8.0.3 database backend. I'm also using courier imap/pop servers connected to postgresql as well. All email users are s

[GENERAL] Regular expressions w localization problem

2005-11-25 Thread Manuel Sugawara
I'm facing a problem I have seen before but never got the time to report until now that is biting me again. I have a table which has some CHECK constrains using regular expressions and one check is failing when I try to insert some valid data. The constraint definition is: «nombre propio válido» C

Re: [GENERAL] Syntax Error in COPY

2005-11-25 Thread Jaime Casanova
On 11/25/05, Együd Csaba <[EMAIL PROTECTED]> wrote: > But the data was dumped with a windows version pg_dump. Or do know wrong > that pgadmin3 uses a boundled version of pg_dump (installed on the client)? > can you run a pg_dump (in FC4) and try with that dump? maybe it's some kind of problem with

Re: [GENERAL] Syntax Error in COPY

2005-11-25 Thread Együd Csaba
But the data was dumped with a windows version pg_dump. Or do know wrong that pgadmin3 uses a boundled version of pg_dump (installed on the client)? BTW after running unix2dos (on cygwin) the error message is the same... :( -- Csaba Együd -Original Message- From: Jaime Casanova [mail

Re: [GENERAL] regarding postmaster.pid file

2005-11-25 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> You do realize that postmaster.pid only takes 100 or so bytes? If you >> are out of space on the database partition, moving the pid file would >> *not* help measurably. > I think he's thinking the other way around. I

Re: [GENERAL] Syntax Error in COPY

2005-11-25 Thread Jaime Casanova
On 11/25/05, Együd Csaba <[EMAIL PROTECTED]> wrote: > Source machine: FC4 + Pg8.0.3 (dumped out from) > Target machine: WinXP SP2. + Pg8.0.0 (trying to dump in) > The maessage : "ERROR: syntax error at or near "DE" at character 144" > ok. in FC4 execute unix2dos dumped_file.sql then try again

Re: [GENERAL] Syntax Error in COPY

2005-11-25 Thread Együd Csaba
Source machine: FC4 + Pg8.0.3 (dumped out from) Target machine: WinXP SP2. + Pg8.0.0 (trying to dump in) The maessage : "ERROR: syntax error at or near "DE" at character 144" -Original Message- From: Jaime Casanova [mailto:[EMAIL PROTECTED] Sent: Friday, November 25, 2005 5:31 PM To: Eg

Re: [GENERAL] Syntax Error in COPY

2005-11-25 Thread Jaime Casanova
On 11/25/05, Együd Csaba <[EMAIL PROTECTED]> wrote: > Hi, > could anybody help me? > > The backend (8.0) complains about the syntax of the following command. (This > row is from a dump created by pgadmin 1.4, using pg_dump.exe v8.0.0.5017) > The syntax error is located at the first 'DE' after the s

[GENERAL] Syntax Error in COPY

2005-11-25 Thread Együd Csaba
Hi, could anybody help me? The backend (8.0) complains about the syntax of the following command. (This row is from a dump created by pgadmin 1.4, using pg_dump.exe v8.0.0.5017) The syntax error is located at the first 'DE' after the stdin;. What's the problem? COPY eden_countries (countrycod

Re: [GENERAL] regarding postmaster.pid file

2005-11-25 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > "surabhi.ahuja" <[EMAIL PROTECTED]> writes: > > My question is that > > while starting postmaster is there an option to specify the location of = > > postmaster.pid file .. > > i was thinking if i can keep the postmaster.pid file in a separate = > > folder .

Re: [GENERAL] pg_connect troubles on localhost

2005-11-25 Thread Tom Lane
John Taber <[EMAIL PROTECTED]> writes: > # TYPE DATABASEUSERCIDR-ADDRESS METHOD > # "local" is for Unix domain socket connections only > local all all ident sameuser "ident sameuser" means you can only connect as the PG user with the sa

Re: [GENERAL] crosstab doesn't work

2005-11-25 Thread Martijn van Oosterhout
On Fri, Nov 25, 2005 at 03:09:06PM +0100, Vittorio wrote: > Dear all, > crosstab doesn't seem to work > anymore putting the above select into crosstab > > switch=# select * from > crosstab('select rowid,attribute, sum(value) as val from ct1 group by > rowid, attribute order by 1,2;', 2) as c

Re: [GENERAL] tool for DB design

2005-11-25 Thread John McCawley
I wrote a little LGPL app that generates Postgres SQL code from a graphical datamodel. It's not professional quality, but it functions. I don't actively maintain it, but I still use it for brainstorming datamodels and quick generation of the database. http://www.hardgeus.com/projects/pgdesig

[GENERAL] crosstab doesn't work

2005-11-25 Thread Vittorio
Dear all, I installed postgresql 8.04 on a pentium box with freebsd 5.4 # psql --version psql (PostgreSQL) 8.0.4 In the db switch I have the following ct1 table switch=# select * from ct1 order by 1,2; id | rowclass | rowid | attribute | value +--+---+--- +---

[GENERAL] Strange VACUUM behaviour

2005-11-25 Thread Florian G. Pflug
Hi We started a VACUUM (not a VACUUM FULL) on one of your postgres 7.4.9 databases a few days ago. It's still running yet, and says the folloing about once per second: INFO: index "pg_toast_2144146_index" now contains 1971674 row versions in 10018 pages DETAIL: 4 index row versions were re

Re: [GENERAL] tool for DB design

2005-11-25 Thread seem . iges
Hi, how about, dia - http://www.gnome.org/projects/dia/ have not used myself, but AFAIK UML diagrams are possible. umbrello - http://uml.sourceforge.net/index.php UML and ERD diagrams. regards, Iges. On Friday, 25. November 2005 12:01, Nikolay Samokhvalov wrote: > dbvis isn't the thing what I

Re: [GENERAL] tool for DB design

2005-11-25 Thread Tino Wildenhain
Nikolay Samokhvalov schrieb: dbvis isn't the thing what I need. Or I'm blind and cannot find where I can draw ER/UML diagram then transform it to physical, then obtain SQL code. Or, just physical->SQL. Please correct me if I'm wrong. Well, I mentioned DIA for this - reread my mail please ;) I s

Re: [GENERAL] pg_dump --data-only: is dump ordered to keep foreign-key-relations

2005-11-25 Thread Florian G. Pflug
Harald Armin Massa wrote: - is pg_dump supposed to produce a "ordered dump" with --data-only? (within documentation there is only a warning that --table will not dump the depending ones) [than I have to create a extract to reproduce that "bug"] - or if it is simply not implemented and an enhan

Re: [GENERAL] regarding the apostrophe character

2005-11-25 Thread Michael Glaesemann
On Nov 25, 2005, at 13:40 , surabhi.ahuja wrote: in which version will the use of "Escape string syntax " be supported .. I know they work in 8.1. You can check the release notes: http://www.postgresql.org/docs/current/interactive/release.html The SQL standard way of escaping single-quotes

Re: [GENERAL] tool for DB design

2005-11-25 Thread Oleg Bartunov
On Fri, 25 Nov 2005, Nikolay Samokhvalov wrote: dbvis isn't the thing what I need. Or I'm blind and cannot find where I can draw ER/UML diagram then transform it to physical, then obtain SQL code. Or, just physical->SQL. Please correct me if I'm wrong. Nikolaym, it's worth to look on Enterpris

[GENERAL] I need a teacher in Huelva, Spain...

2005-11-25 Thread Sergio Trujillo
Hello to all. I'm new in this list. I need a teacher for PostgreSQL administration's course, here in Spain (Huelva). The students have some experience with postgresql, but they need more expert knowledge. There are 5 days to do this, in 5 hours per day. Total, 25 hours. We need a teacher that spe

Re: [GENERAL] pg_dump --data-only: is dump ordered to keep foreign-key-relations loadable?

2005-11-25 Thread Harald Armin Massa
Florian, thank you very much for those solutions; I shortened them, resend them for "increased google presence" :) 1) Use [...] --disable-trigger option  [...] 2) foreign keys as "deferrable",  do "set contraints alldeferred" before loading the data. 3)  split the schema dump into two files, a) tab

Re: [GENERAL] Multi-parameter aggregates.

2005-11-25 Thread Berend Tober
Michael Fuhr wrote: On Mon, Nov 21, 2005 at 11:03:22AM -0500, Berend Tober wrote: I'm interested in defining a covariance aggregate function. (As a ...aggregates must take a single value, so the above won't work as written. However, in PostgreSQL 8.0 or later you could define the aggr

Re: [GENERAL] tool for DB design

2005-11-25 Thread Nikolay Samokhvalov
dbvis isn't the thing what I need. Or I'm blind and cannot find where I can draw ER/UML diagram then transform it to physical, then obtain SQL code. Or, just physical->SQL. Please correct me if I'm wrong. On 25/11/05, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Am Freitag, den 25.11.2005, 02:25 +

Re: [GENERAL] pg_connect troubles on localhost

2005-11-25 Thread John Taber
thks for info - but my pg_ident is empty (correctly I believe since users are equal to pg_users) so I have: pg_ident.conf # MAPNAME IDENT-USERNAMEPG-USERNAME pg_hba.conf # TYPE DATABASEUSERCIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only loc

Re: [GENERAL] New user questions

2005-11-25 Thread Peter Eisentraut
Walter Dnes wrote: > 2) Although I have an AMD64 cpu. I chickened out and went for a > 32-bit install. If/when I do migrate to 64-bit, can I keep my > databases, or will I have to export/import them? The latter. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---

Re: [GENERAL] Deadlock Detected (revisited)

2005-11-25 Thread Stephan Szabo
On Fri, 25 Nov 2005, Wes wrote: > I haven't seen anything to indicate that 8.x improves foreign key > refererence locking and fixes the foreign key 'deadlock detected' issue. > Has that been addressed in 8.1? 8.1 should be using the new shared row locks for doing the checks. This should fix the