Re: [GENERAL] Is Linux 2.6.5 kernel good enough for production?

2004-05-17 Thread Richard Huxton
Dirk Försterling wrote: There were some dumb queries with timestamps, performing much slower with Linux-2.6.5 compared to Linux-2.4.25: The queries used something like this (ts is a TIMESTAMP): ... AND ts LIKE '2003-04-%' I'm guessing an index isn't being used because your LANG is something-UT

Re: [GENERAL] will I need nested transactions ?

2004-05-17 Thread Ben
If you want the model where if any updates fail, all should be rolled back, then you don't need nested transactions, just multiple aborts: begin; update d; if error abort; update c; if error abort; ... commit; On Mon, 17 May 2004, Andreas wrote: > Hi, > > will I need "n

Re: [GENERAL] will I need nested transactions ?

2004-05-17 Thread Richard Huxton
Andreas wrote: Hi, will I need "nested transactions" which - as I read - aren't implemented, yet ? I have some objects that rely on each other. Each has a status like proposal, working, canceled. table-A <--- table-B <--- table-C <--- table-D Those are (1, OO) relationships, A statu

[GENERAL] will I need nested transactions ?

2004-05-17 Thread Andreas
Hi, will I need "nested transactions" which - as I read - aren't implemented, yet ? I have some objects that rely on each other. Each has a status like proposal, working, canceled. table-A <--- table-B <--- table-C <--- table-D Those are (1, OO) relationships, A status change above

Re: [GENERAL] serial autoincrement and related table

2004-05-17 Thread Milos Prudek
> Actually, if you declared idmember as SERIAL PRIMARY KEY, you could > just do: I can't do that. idmember is a SERIAL PRIMARY KEY for members. Each member can have many messages (msg table) with the same idmember column value. See my original post. -- Milos Prudek ---(en

Re: [GENERAL] serial autoincrement and related table

2004-05-17 Thread Milos Prudek
Alternatively, you could rewrite this query: "INSERT INO msg (idmember,txt) VALUES (currval('members_idmember_seq'), %s);" Cool. You helped me demolish 3 lines of code with no compromise in legibility. -- Milos Prudek ---(end of broadcast)--- TIP 5

Re: [GENERAL] serial autoincrement and related table

2004-05-17 Thread Richard Huxton
Milos Prudek wrote: I have a serial autoincrement column called "idmember" in my main table (members). This serial column is a key to a second table. A row in "members" table corresponds to many rows in the second table. My question is: is this the best practice? Here's an example in Python: con

Re: [GENERAL] serial autoincrement and related table

2004-05-17 Thread Milos Prudek
> If you want PostgreSQL to populate your idmember field with the next > value from the sequence, you need to specify the keyword DEFAULT as its > value or omit it from the INSERT list of coulumns (this assumes you have I do omit it. > DEFAULT nextval('members_idmember_seq') defined on the idmember

Re: [GENERAL] serial autoincrement and related table

2004-05-17 Thread Paul Thomas
On 17/05/2004 11:24 Milos Prudek wrote: Cmd = "INSERT INTO members ... VALUES (...);" If you want PostgreSQL to populate your idmember field with the next value from the sequence, you need to specify the keyword DEFAULT as its value or omit it from the INSERT list of coulumns (this assumes you

Re: [GENERAL] PgSQL 7.4.2 - NaN on Tru64 UNIX

2004-05-17 Thread Nikola Milutinovic
Nikola Milutinovic wrote: + #define NAN DBL_INFINITY The compilation has went smoothly, I'll try to run regression tests. Will let you know if something fails. Hate to reply to myself, but here goes. With NAN defined as "DBL_INFINITY" I get 3 failed regression test, most notably "float8" test.

[GENERAL] serial autoincrement and related table

2004-05-17 Thread Milos Prudek
I have a serial autoincrement column called "idmember" in my main table (members). This serial column is a key to a second table. A row in "members" table corresponds to many rows in the second table. What is the best way to discover current "idmember" value if I create a few rows in the second

[GENERAL] type conversion date <-> timestamp

2004-05-17 Thread Ulrich Wisser
Hi, today I started to wonder about type conversion. I want to get all rows of a table dated between two given dates. Until now I use select * from mytable where to_date('20040115', 'MMDD') <= timestamp and timestamp <= to_date('20040215', MMDD') Does that query include the 15th January a

Re: [GENERAL] table column information

2004-05-17 Thread Nick Barr
Scot L. Harris wrote: Currently using Postgresql 7.2.4-5.80 with php 4.2.2.-8.0.8 on a redhat 8.0 system. I am writing some php scripts where I want to generate a list of the column names in a particular table that the user selects. I could take the brute force method and hard code the column name

Re: [GENERAL] SQL norm views to describes tables (and probably some

2004-05-17 Thread Shridhar Daithankar
Bruno BAGUETTE wrote: Hello, I know that the SQL norm contains some views to describes the tables (and probably some other things) of a database. Does PostgreSQL implement theses views (from which version number) ? I don't find anything in the documentation about that. You meant this? http://www.po

Re: [GENERAL] SQL norm views to describes tables (and probably some other things) of a database ?

2004-05-17 Thread Troels Arvin
On Mon, 17 May 2004 09:32:49 +0200, Bruno BAGUETTE wrote: > I know that the SQL norm contains some views to describes the tables (and > probably some other things) of a database. > > Does PostgreSQL implement theses views (from which version number) ? I > don't find anything in the documentation

[GENERAL] SQL norm views to describes tables (and probably some other things) of a database ?

2004-05-17 Thread Bruno BAGUETTE
Hello, I know that the SQL norm contains some views to describes the tables (and probably some other things) of a database. Does PostgreSQL implement theses views (from which version number) ? I don't find anything in the documentation about that. Thanks in advance ! --

Re: [GENERAL] fsync = true beneficial on ext3?

2004-05-17 Thread Greg Stark
Bruce Momjian <[EMAIL PROTECTED]> writes: > JM wrote: > > Would a battery backed Card do the trick? > > No because the fsync causes the data to hit the card. Without the > fscync, the data could remain only in the kernel cache. A battery backed card for the transaction logs wouldn't make it saf