Re: [HACKERS] optimizer question

2001-10-12 Thread Bruce Momjian
> Hannu Krosing <[EMAIL PROTECTED]> writes: > > Maybe rather > > > * Use indexes for min() and max() or convert to "SELECT col FROM tab > > ORDER BY col DESC USING max_index_op LIMIT 1" if there is an index > > on tab that uses btree(col max_index_op) > > > it seems that in most other cases

Re: [HACKERS] row value constructor bug?

2001-10-12 Thread Bruce Momjian
> Tatsuo Ishii <[EMAIL PROTECTED]> writes: > > In my understanding below row value constructors(I hope this term is > > correct) exaples should return true, but PostgreSQL does not. > > By my reading, a "row value constructor" is one of the things in > parentheses, while the whole clause is a "co

Re: [HACKERS] FAQ error

2001-10-12 Thread Bruce Momjian
> On 10 Oct 2001 at 17:12 (-0400), Bruce Momjian wrote: > | > | Our FAQ, item 4.16.2 has: > | > | $newSerialID = nextval('person_id_seq'); > | INSERT INTO person (id, name) VALUES ($newSerialID, 'Blaise Pascal'); > | > | Is this correct Perl? I don't see a nextval() function in Perl.

Re: [HACKERS] Pre-forking backend

2001-10-12 Thread Bruce Momjian
> Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > How hard would it be to pre-fork an extra backend > > > > How are you going to pass the connection socket to an already-forked > > child process? AFAIK there's no remotely portable way ... > > One of the mechanisms I've

[HACKERS] Package support for Postgres

2001-10-12 Thread Bill Studenmund
Zembu has decided to release the result of a recent Postgres developement project to the Postgres project. This project (for which I was the lead developer) adds Oracle-like package support to Postgres. I'm in the process of making a version of the patch which is relative to the current cvs tree.

Re: [HACKERS] optimizer question

2001-10-12 Thread Bruce Momjian
> Bruce Momjian wrote: > > > > > "Reinoud van Leeuwen" <[EMAIL PROTECTED]> writes: > > > > I have a table that contains almost 8 milion rows. The primary key is a > > > > sequence, so the index should have a good distribution. Why does the > > > > optimizer refuse to use the index for getting the

Re: [HACKERS] New contrib/tsearch module for 7.2

2001-10-12 Thread Tom Lane
Oleg Bartunov <[EMAIL PROTECTED]> writes: > we'd like to submit new module contrib/tsearch which > contains implementation of new data type txtidx - > a searchable data type (textual) with indexed access. Committed into contrib. I made an addition of a cast to unsigned char in the tolower() call

Re: [HACKERS] BUG: text(varchar) truncates at 31 bytes

2001-10-12 Thread Bruce Momjian
I can confirm this is fixed in current sources. Thanks for the report. --- > #create table t (v varchar); > #insert into t values ('0123456789a0123456789b0123456789c0123456789d'); > > #select v from t; > >

[HACKERS] How do I get the current time in seconds in the unix epoch?

2001-10-12 Thread Bill Studenmund
I have a function in PL/pgSQL which needs the current time in seconds expressed as an int4. In 7.1 I was able to get this (I thought) with date_part(''epoch'', timestamp ''now'') . That doesn't seem to work for me in last week's -current. Here's the PLpgSQL: v_seed := date_part(''epoch''

Re: [HACKERS] PERFORMANCE IMPROVEMENT by mapping WAL FILES

2001-10-12 Thread Bruce Momjian
I have added this to TODO.detail/mmap. > I have just completed the functional testing the WAL using mmap , it is > > working fine, I have tested by commenting out the "CreateCheckPoint " > functionality so that >when i kill the postgres and restart it will redo all the records

Re: [HACKERS] SQL99 time zones

2001-10-12 Thread Tom Lane
Thomas Lockhart <[EMAIL PROTECTED]> writes: > I'm working on patches to implement the (slightly brain damaged) SQL9x > time zone spec. This allows one to specify a numeric time offset for the > time zone. [ ... ] > Comments? While this is doubtless a good thing, I'm starting to feel very itchy a

Re: [HACKERS] HISTORY

2001-10-12 Thread Bruce Momjian
> Could you not include characters other than ASCII in the HISTORY file, > please. > > > Python fix fetchone() (Gerhard H舐ing) Fixed. Thanks. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a

Re: [HACKERS] Accessing Database files on a "read-only" medium...like

2001-10-12 Thread Bruce Momjian
I wonder if you shut down the postmaster and restart if that would make it work again. I can't imagine where it would store table size information if the area is read-only. Adding data, full vacuum, restart postmaster should allow read-only databases. --

Re: [HACKERS] Deadlock? idle in transaction

2001-10-12 Thread Michael Meskes
On Thu, Oct 11, 2001 at 01:09:25PM -0700, Stephan Szabo wrote: > Well, it'd be likely to get in this state if the first transaction grabbed > any write locks and then sat on them without committing or doing any more > commands, since the vacuum would wait on that and the rest of the > transactions

Re: [HACKERS] optimizer question

2001-10-12 Thread Hannu Krosing
Bruce Momjian wrote: > > > "Reinoud van Leeuwen" <[EMAIL PROTECTED]> writes: > > > I have a table that contains almost 8 milion rows. The primary key is a > > > sequence, so the index should have a good distribution. Why does the > > > optimizer refuse to use the index for getting the maximum val

Re: [HACKERS] optimizer question

2001-10-12 Thread Tom Lane
Hannu Krosing <[EMAIL PROTECTED]> writes: > Maybe rather > * Use indexes for min() and max() or convert to "SELECT col FROM tab > ORDER BY col DESC USING max_index_op LIMIT 1" if there is an index > on tab that uses btree(col max_index_op) > it seems that in most other cases the rewrite wou

Re: [HACKERS] Deadlock? idle in transaction

2001-10-12 Thread Michael Meskes
On Thu, Oct 11, 2001 at 08:26:48PM -0400, Tom Lane wrote: > You evidently have some client applications holding open transactions Okay, I know where to look for that. Thanks. > that have locks on some tables. That's not a deadlock --- at least, It is no deadlock if the transaction holding the

Re: [HACKERS] optimizer question

2001-10-12 Thread Hannu Krosing
Bruce Momjian wrote: > > > Bruce Momjian wrote: > > > > > > > "Reinoud van Leeuwen" <[EMAIL PROTECTED]> writes: > > > > > I have a table that contains almost 8 milion rows. The primary key is a > > > > > sequence, so the index should have a good distribution. Why does the > > > > > optimizer refu

[HACKERS] [Fwd: Postgre SQL Developer - Chicago, IL]

2001-10-12 Thread Thomas Lockhart
Possible job... - Thomas Original Message Subject: Postgre SQL Developer - Chicago, IL Date: Thu, 11 Oct 2001 14:01:12 -0400 From: "Crystal, Jennifer" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Hi, my name is Jennifer Crystal and I

Re: [HACKERS] pg_dump oid problems

2001-10-12 Thread steve
Problem solved, 3GB dumped OK -- Thanks Tom Steve Tom Lane wrote: > steve <[EMAIL PROTECTED]> writes: > > DEBUG: query: SELECT c.relname FROM pg_index i LEFT OUTER JOIN pg_class c > > ON c.oid = i.indexrelid WHERE i.indrelid = 3527162388AND i.indisprimary > > ERROR: dtoi4: integer out of ra

Re: [HACKERS] Glitch in handling of postmaster -o options

2001-10-12 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > > Would someone give me a status on this? > > I don't think we need any code changes. If we decide to deprecate -o > (or anything else), it's just a documentation change. So we can argue > about it during beta ... > > >> If we notify of the impendi

Re: [HACKERS] EXTRACT broken

2001-10-12 Thread Thomas Lockhart
> > > peter=# SELECT EXTRACT(DOW FROM TIME '20:38:40'); > > > ERROR: Interval units 'dow' not recognized > > > The expression is nonsensical, but so is the result. > > Hmm. Why is the result nonsensical? "day of week" does not have meaning > > for intervals, so it should not be recognized, right?

Re: [HACKERS] Pre-forking backend

2001-10-12 Thread Bruce Momjian
> Gavin Sherry <[EMAIL PROTECTED]> writes: > > > This aside, isn't it possible to just copy the socket and some > > data about the database required into shared memory and have the preforked > > children pick the socket up from there. > > Ummm No. There's no Unix API for doing so. > > You

[HACKERS] New contrib/tsearch module for 7.2

2001-10-12 Thread Oleg Bartunov
Hi, we'd like to submit new module contrib/tsearch which contains implementation of new data type txtidx - a searchable data type (textual) with indexed access. It's based on current CVS and will not works with earlier version of PostgreSQL. Archive is available from http://www.sai.msu.su/~mege

Re: [HACKERS] Unicode combining characters

2001-10-12 Thread Bruce Momjian
> * Bruce Momjian <[EMAIL PROTECTED]> [011011 22:49]: > > > > Can I ask about the status of this? > > I have sent a patch a few days ago solving the client-side issue (on > the pgsql-patches mailing list) for review. I think Tatsuo said it > looked OK, however he should confirm/infirm this. OK,

Re: [HACKERS] Unicode combining characters

2001-10-12 Thread Tatsuo Ishii
> * Bruce Momjian <[EMAIL PROTECTED]> [011011 22:49]: > > > > Can I ask about the status of this? > > I have sent a patch a few days ago solving the client-side issue (on > the pgsql-patches mailing list) for review. I think Tatsuo said it > looked OK, however he should confirm/infirm this. I'v