[SQL] Re: abstract data types?

2001-01-27 Thread John Reid
Hi Josh, all, Thanks for your comments. My 2c worth: Josh Berkus wrote: > Mr. Reid, > > >> To answer your question, it is a bit hard to say at the moment as the >> design schema for our project has only just been started. The draft >> versions of the ISO standard that I have seen use an ob

[HACKERS] wrong query plan in 7.1beta3

2001-01-27 Thread Kovacs Zoltan
There seems to be an optimizer problem in 7.1beta3. The query you can see below worked fast in 7.0.2 but in 7.1beta3 is rather slow. The problem is that an 'index scan' has been changed to a 'seq scan'. Details: CREATE F

Re: [HACKERS] wrong query plan in 7.1beta3

2001-01-27 Thread Peter Eisentraut
Kovacs Zoltan writes: > There seems to be an optimizer problem in 7.1beta3. The query you can see > below worked fast in 7.0.2 but in 7.1beta3 is rather slow. The problem is > that an 'index scan' has been changed to a 'seq scan'. Details: > Subquery Scan sd_user_grant (cost=38.68..38.85 rows=1

Re: [HACKERS] wrong query plan in 7.1beta3

2001-01-27 Thread Kovacs Zoltan
On Sat, 27 Jan 2001, Peter Eisentraut wrote: > Kovacs Zoltan writes: > > > There seems to be an optimizer problem in 7.1beta3. The query you can see > > below worked fast in 7.0.2 but in 7.1beta3 is rather slow. The problem is > > that an 'index scan' has been changed to a 'seq scan'. Details: >

[SQL] Re: [HACKERS] wrong query plan in 7.1beta3

2001-01-27 Thread Tom Lane
Kovacs Zoltan <[EMAIL PROTECTED]> writes: > There seems to be an optimizer problem in 7.1beta3. The query you can see > below worked fast in 7.0.2 but in 7.1beta3 is rather slow. The problem is > that an 'index scan' has been changed to a 'seq scan'. Details: This is fixed in current sources: I g

[SQL] Architectural question

2001-01-27 Thread Kovacs Baldvin
Hello everybody. I would like to create a database. It's a structure of about 20 items (tables, views, etc.) Then I would like to make it a template, because I need 7 copies of this structure, possibly a growing number. The only problem is that there are four tables in it, which are general

[SQL] looping through results of a SELECT

2001-01-27 Thread Nagy Tamas
Hello! I'd like to write a function, that makes some calculations (perhaps applies another function) on every row of a result set returned by a SELECT query. I thought writing a WHILE loop would work, but I couldn't assign the individual rows to a variable. Then, I read about the FETCH co

[SQL] RE: looping through results of a SELECT

2001-01-27 Thread Michael Davis
Try using aggregate functions. Creating your own aggregate function is fairly easy and can produce the exact results you are looking for. In case this is not good enough, here is an example of some code I used to loop through rows in a table in pl/pgsql CREATE FUNCTION pending_post_transact

[SQL] Queries against multi-million record tables.

2001-01-27 Thread Michael Miyabara-McCaskey
Hello all, I am in the midst of taking a development DB into production, but the performance has not been very good so far. The DB is a decision based system, that currently has queries against tables with up to 20million records (3GB table sizes), and at this point about a 25GB DB in total. {La

[SQL] BTP_CHAIN errors fixed?

2001-01-27 Thread Mark Volpe
Hi, I have been using PostgreSQL-7.0.0 and have had the problem that, when searching a btree index that contains large numbers of duplicate keys, Postgres crashes with a BTP_CHAIN error. Now that I have installed 7.1beta3 the problem has seemingly been fixed. Was this problem actually fixed somewh

Re: [SQL] BTP_CHAIN errors fixed?

2001-01-27 Thread Tom Lane
Mark Volpe <[EMAIL PROTECTED]> writes: > I have been using PostgreSQL-7.0.0 and have had the problem that, when > searching a btree index that contains large numbers of duplicate keys, > Postgres crashes with a BTP_CHAIN error. Now that I have installed 7.1beta3 > the problem has seemingly been fi

Re: [SQL] BTP_CHAIN errors fixed?

2001-01-27 Thread Mark Volpe
Tom Lane wrote: > > Mark Volpe <[EMAIL PROTECTED]> writes: > > I have been using PostgreSQL-7.0.0 and have had the problem that, when > > searching a btree index that contains large numbers of duplicate keys, > > Postgres crashes with a BTP_CHAIN error. Now that I have installed 7.1beta3 > > the

Re: [SQL] Re: abstract data types?

2001-01-27 Thread Josh Berkus
John, > Thanks for your comments. My 2c worth: That was at least $1.50 worth. Teach me to speak 'off the cuff' on this list ... > As > far as the > relationship between the schemas for financial and > spatial information > systems goes, a book I have (on OO database management) > goes so far

[SQL] Re: abstract data types?

2001-01-27 Thread John Reid
Hi again, Josh Berkus wrote: > John, > > > Thanks for your comments. My 2c worth: > > That was at least $1.50 worth. Teach me to speak 'off the > cuff' on this list ... Just because I went out and brought a stack of books doesn't mean that I actually know anything ;-) > > As > > far as the >

[SQL] current host and dbname info

2001-01-27 Thread Joe Conway
Hi, I've been searching the docs and been unable to find the answer to this -- is there a way to get the current database server host tcpip address, postmaster port, and database name from a SQL query? I'd like to access those from within a plpgsql function without having to create and populate