Re: [HACKERS] GROUP BY + join regression in 7.3

2003-03-31 Thread Joe Conway
Tom Lane wrote: Just out of curiosity --- Here's what I get: select * from t1 f1 f2 --- --- 1 1 2 2 (2 row(s) affected) select * from t2 f2 f3 --- --- 1 3 (1 row(s) affected) select t1.f2 from t2 right join t1 on t1

Re: [HACKERS] GROUP BY + join regression in 7.3

2003-03-31 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > I did the above on MSSQL2000 -- it works with no error. Just out of curiosity --- does MSSQL treat "f1" and "t1.f1" as different in the RIGHT JOIN variant case I mentioned? Previous reports have led me to have a very low estimate of their [understanding of

Re: [HACKERS] optimizer cost calculation problem

2003-03-31 Thread Ron Mayer
Tom wrote: > >I find it really really hard to believe that it's wise to run with >sort_mem exceeding 2 gig ;-). Does that installation have so much >RAM that it can afford to run multiple many-Gb sorts concurrently? I don't do 2 gig... but I found 0.3 gig helped on a not-too-large system. In a

Re: [HACKERS] GROUP BY + join regression in 7.3

2003-03-31 Thread Joe Conway
Tom Lane wrote: I have just noticed that 7.3 and CVS tip reject a query that was accepted in earlier releases: regression=# create table t1(f1 int, f2 int); CREATE TABLE regression=# create table t2(f2 int, f3 int); CREATE TABLE regression=# select t1.f1 from t1 join t2 on (t1.f2=t2.f2) group by f1

Re: [HACKERS] optimizer cost calculation problem

2003-03-31 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > BTW it does not 2 gig, but 1 gig (remember that we do sortmembytes * > 2) . Good point. Probably that particular calculation should be "sortmembytes * 2.0" to force it to double before it can overflow. But I still think we'd better limit SortMem so that

Re: [HACKERS] optimizer cost calculation problem

2003-03-31 Thread Tatsuo Ishii
> Tatsuo Ishii <[EMAIL PROTECTED]> writes: > > Kenji Sugita has identified a problem with cost_sort() in costsize.c. > > In the following code fragment, sortmembytes is defined as long. So > > double nruns = nbytes / (sortmembytes * 2); > > may cause an integer overflow if sort

Re: [HACKERS] deadlock problem

2003-03-31 Thread Kevin Brown
Christopher Kings-Lynne wrote: > I'm always getting deadlocks like this: > > [30-Mar-2003 19:19:51] PHP Fatal error: postgres7 error: [0: ERROR: > deadlock detected > ] in EXECUTE("INSERT INTO users_foods (user_id, date, meal_id, quantity, > eaten, food_id) VALUES ('55283', '2003-04-07', '1', '1.

Re: [HACKERS] index corruption?

2003-03-31 Thread scott.marlowe
On Mon, 31 Mar 2003, Ed L. wrote: > On Feb 13, 2003, Tom Lane wrote: > > > > Laurette Cisneros <[EMAIL PROTECTED]> writes: > > > This is the error in the pgsql log: > > > 2003-02-13 16:21:42 [8843] ERROR: Index external_signstops_pkey is > > > not a btree > > > > This says that one of two field

Re: [HACKERS] index corruption?

2003-03-31 Thread Ed L.
On Monday March 31 2003 3:54, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > >> I am seeing this same problem on two separate machines, one brand new, > >> one older. Not sure yet what is causing it, but seems pretty unlikely > >> that it is hardware-related. > > > > I am dabbling for the

Re: [HACKERS] optimizer cost calculation problem

2003-03-31 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > Kenji Sugita has identified a problem with cost_sort() in costsize.c. > In the following code fragment, sortmembytes is defined as long. So > double nruns = nbytes / (sortmembytes * 2); > may cause an integer overflow if sortmembytes

Re: [HACKERS] index corruption?

2003-03-31 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: >> I am seeing this same problem on two separate machines, one brand new, >> one older. Not sure yet what is causing it, but seems pretty unlikely >> that it is hardware-related. > I am dabbling for the first time with a (crashing) C trigger, so that may be >

Re: [HACKERS] index corruption?

2003-03-31 Thread Ed L.
On Monday March 31 2003 3:38, Ed L. wrote: > On Feb 13, 2003, Tom Lane wrote: > > Laurette Cisneros <[EMAIL PROTECTED]> writes: > > > This is the error in the pgsql log: > > > 2003-02-13 16:21:42 [8843] ERROR: Index external_signstops_pkey is > > > not a btree > > > > This says that one of two f

Re: [HACKERS] index corruption?

2003-03-31 Thread Ed L.
On Feb 13, 2003, Tom Lane wrote: > > Laurette Cisneros <[EMAIL PROTECTED]> writes: > > This is the error in the pgsql log: > > 2003-02-13 16:21:42 [8843] ERROR: Index external_signstops_pkey is > > not a btree > > This says that one of two fields that should never change, in fixed > positions in

[HACKERS] optimizer cost calculation problem

2003-03-31 Thread Tatsuo Ishii
Kenji Sugita has identified a problem with cost_sort() in costsize.c. In the following code fragment, sortmembytes is defined as long. So double nruns = nbytes / (sortmembytes * 2); may cause an integer overflow if sortmembytes exceeds 2^30, which in turn make optimizer

Re: [HACKERS] ltree patch

2003-03-31 Thread Bruce Momjian
Patch applied to HEAD and 7.3.X. Thanks. --- Teodor Sigaev wrote: > Please, apply patch for contrib/ltree to current CVS and 7.3.2 > > CHANGES > > Mar 28, 2003 > Added finctions index(ltree,ltree,offset), text2ltree(

Re: [HACKERS] What's a good PostgreSQL guide book?

2003-03-31 Thread korry
The thing that's "wrong" with any of the books that are available is that they have considerable portions about the whole variety of language "bindings" (e.g. - Perl, Python, C, C++, ...) which bulk up the book when it's really only likely that you'd need a reference on one or two of the languages

Re: [HACKERS] What's wrong

2003-03-31 Thread ohp
Never mind, it seems I found the bug. May I suggest something in the docs a bit more explicit than it is... Regards and many_ thanks On Mon, 31 Mar 2003, Tom Lane wrote: > Date: Mon, 31 Mar 2003 13:24:42 -0500 > From: Tom Lane <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Cc: pgsql-hackers list

Re: [HACKERS] What's wrong

2003-03-31 Thread ohp
I agree, But I've been doing this by the book, what should I do then? On Mon, 31 Mar 2003, Tom Lane wrote: > Date: Mon, 31 Mar 2003 13:24:42 -0500 > From: Tom Lane <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Cc: pgsql-hackers list <[EMAIL PROTECTED]> > Subject: Re: [HACKERS] What's wrong > > [E

[HACKERS] GROUP BY + join regression in 7.3

2003-03-31 Thread Tom Lane
I have just noticed that 7.3 and CVS tip reject a query that was accepted in earlier releases: regression=# create table t1(f1 int, f2 int); CREATE TABLE regression=# create table t2(f2 int, f3 int); CREATE TABLE regression=# select t1.f1 from t1 join t2 on (t1.f2=t2.f2) group by f1; ERROR: Attri

Re: [HACKERS] SQL/XML examples

2003-03-31 Thread Merlin Moncure
Peter Eisentraut wrote: > I've found a web page that contains some examples of the use of the > features in the proposed SQL/XML standard (as implemented by Oracle). > This should give us some ideas about what to aim for. > > http://otn.oracle.com/tech/xml/xmldb/htdocs/sql_xml_codeexamples.html >

Re: [HACKERS] Changing behavior of BEGIN...sleep...do something...COMMIT

2003-03-31 Thread Tom Lane
"scott.marlowe" <[EMAIL PROTECTED]> writes: > On Fri, 28 Mar 2003, Tom Lane wrote: >> It seems to me that it'd be fairly easy to make BEGIN cause only >> a local state change in the backend; the actual transaction need not >> start until the first subsequent command is received. It's already >> tr

Re: [HACKERS] Changing behavior of BEGIN...sleep...do something...COMMIT

2003-03-31 Thread scott.marlowe
On Fri, 28 Mar 2003, Tom Lane wrote: > It seems to me that it'd be fairly easy to make BEGIN cause only > a local state change in the backend; the actual transaction need not > start until the first subsequent command is received. It's already > true that the transaction snapshot is not frozen at

Re: [HACKERS] UltraSQL Win32 source code/patches?

2003-03-31 Thread Jan Wieck
Russ Mercer wrote: > > How can I compile the UltraSQL version of PostgreSQL for Win32? I am looking for a > Win32 version of PostgreSQL that does not depend on cygwin, and UltraSQL seems to > work well. > > This site (http://techdocs.postgresql.org/guides/Windows) only points to the > UltraSQL

Re: [HACKERS] inquiery

2003-03-31 Thread Jan Wieck
Jinqiang Han wrote: > > hello£¬ > what is RIR rules in Rewriter? What RIR means? > Thank you very much. > Jinqiang Han Retrieve-Instead-Retrieve The name is based on history. RETRIEVE was the PostQUEL keyword for what you know as SELECT. A rule fired on a RETRIEVE event, that is an unconditiona

Re: [HACKERS] PostgreSQL and SOAP, suggestions?

2003-03-31 Thread Hannu Krosing
[EMAIL PROTECTED] kirjutas E, 31.03.2003 kell 19:52: > Actually, as far as I am aware, the header is for metadata, i.e. it is the > place to describe the data being returned. Did you read the SOAP spec ? > The description of the fields > isn't the actual data retrieved, so it doesn't belong in th

Re: [HACKERS] deadlock problem

2003-03-31 Thread Stephan Szabo
On Mon, 31 Mar 2003, Christopher Kings-Lynne wrote: > I'm always getting deadlocks like this: > > [30-Mar-2003 19:19:51] PHP Fatal error: postgres7 error: [0: ERROR: > deadlock detected > ] in EXECUTE("INSERT INTO users_foods (user_id, date, meal_id, quantity, > eaten, food_id) VALUES ('55283',

Re: [HACKERS] PostgreSQL and SOAP, suggestions?

2003-03-31 Thread pgsql
Actually, as far as I am aware, the header is for metadata, i.e. it is the place to describe the data being returned. The description of the fields isn't the actual data retrieved, so it doesn't belong in the body, so it should go into the header. > mlw kirjutas E, 31.03.2003 kell 03:43: >> Give

[HACKERS] 7.3.2 make failed on AIX4.3 using native c compiler

2003-03-31 Thread John Liu
make[4]: Leaving directory `/emrxdbs/postgresql-7.3.2/src/backend/parser' cc -O2 -qmaxmem=16384 -qsrcmsg -qlonglong -I../../../src/interfaces/libpq -I ../../../src/include -I/usr/local/include -DBINDIR=\"/emrxdbs/pgsql/bin\" - c -o pg_dump.o pg_dump.c 2681 |

Re: [HACKERS] Error-message infrastructure: what about location in PL functions?

2003-03-31 Thread Jan Wieck
Tom Lane wrote: > > I thought of something I'd overlooked in my original proposal for error- > handling upgrades: what about reporting where an error occurs in a PL > function? > > Currently, plpgsql has a hack that prints a separate WARNING giving > the error location, but this is pretty darn ug

Re: [HACKERS] updateable cursors & visibility

2003-03-31 Thread Hannu Krosing
Hiroshi Inoue kirjutas E, 31.03.2003 kell 19:08: > > -Original Message- > > From: Hannu Krosing [mailto:[EMAIL PROTECTED] > > > > Hiroshi Inoue kirjutas E, 31.03.2003 kell 03:40: > > > > > 2) dynamic > > >It can detect any changes made to the membership, order, > > >and values of

Re: [HACKERS] PostgreSQL and SOAP, suggestions?

2003-03-31 Thread Hannu Krosing
mlw kirjutas E, 31.03.2003 kell 03:43: > Given a HTTP formatted query: > GET "http://localhost:8181/pgmuze?query=select+*+from+zsong+limit+2"; > > The output is entered below. > > Questions: > Is there a way, without spcifying a binary cursor, to get the data types > associated with columns? Rig

Re: [HACKERS] deadlock problem

2003-03-31 Thread Bruce Momjian
Christopher Kings-Lynne wrote: > I'm always getting deadlocks like this: > > [30-Mar-2003 19:19:51] PHP Fatal error: postgres7 error: [0: ERROR: > deadlock detected > ] in EXECUTE("INSERT INTO users_foods (user_id, date, meal_id, quantity, > eaten, food_id) VALUES ('55283', '2003-04-07', '1', '1.

Re: [HACKERS] updateable cursors & visibility

2003-03-31 Thread Hannu Krosing
Hiroshi Inoue kirjutas E, 31.03.2003 kell 03:40: > Tom Lane wrote: > > > > Serializable or not, there is a good case for saying that cursors don't > > see changes made after they are opened, period. The current > > implementation locks down the cursor's snapshot at DECLARE time. > > It's only b

Re: [HACKERS] A few questions:

2003-03-31 Thread Bruce Momjian
Christopher Kings-Lynne wrote: > 1. Did that fix to not allow cluster on partial and non-null indexes get > backpatched? Yes, I see it in 7.3.X CVS. > 2. How can I deliberately cause a deadlock in order to test some code? Sure: CREATE TABLE t1(x int); CREATE TABLE t2(x i

Re: [HACKERS] Roadmap for FE/BE protocol redesign

2003-03-31 Thread Kevin Brown
Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > ... So the application already knows > > that "foo" is the table and "a" is the column. So if the application > > wants to know about details on the column "a", it can execute > > SELECT whatever FROM pg_attribute, pg_class WHERE r

Re: [HACKERS] updateable cursors & visibility

2003-03-31 Thread Hiroshi Inoue
> -Original Message- > From: Hannu Krosing [mailto:[EMAIL PROTECTED] > > Hiroshi Inoue kirjutas E, 31.03.2003 kell 03:40: > > > 2) dynamic > >It can detect any changes made to the membership, order, > >and values of the result set after the cursor is opened. > > What would it me

Re: [HACKERS] What's a good PostgreSQL guide book?

2003-03-31 Thread Robert Treat
On Thu, 2003-03-27 at 08:05, Michael Alan Dorman wrote: > "Gary Hendricks" <[EMAIL PROTECTED]> writes: > > > I'm thinking of buying "Practical PostgreSQL" from O'Reilly. > > > > Has anyone got any comments on this book? > > As Christopher Browne pointes out, some of the information is > outdated.

[HACKERS] deadlock problem

2003-03-31 Thread Christopher Kings-Lynne
I'm always getting deadlocks like this: [30-Mar-2003 19:19:51] PHP Fatal error: postgres7 error: [0: ERROR: deadlock detected ] in EXECUTE("INSERT INTO users_foods (user_id, date, meal_id, quantity, eaten, food_id) VALUES ('55283', '2003-04-07', '1', '1.00', 'f', '779')") in /usr/local/www/gener

Re: [HACKERS] Detecting corrupted pages earlier

2003-03-31 Thread Kevin Brown
Tom Lane wrote: > Here's what I put in --- feel free to suggest better wording. > > ZERO_DAMAGED_PAGES (boolean) > > Detection of a damaged page header normally causes PostgreSQL to > report an error, aborting the current transaction. Setting > zero_damaged_pages to true causes the

Re: [HACKERS] Domain breakage

2003-03-31 Thread Kevin Brown
Tom Lane wrote: > A different line of attack would be to modify the operator/function > resolution rules to take account of domain relationships explicitly, > making the binding of domain to base type stronger than mere binary > equivalence. But I'm not clear how that might work. > > Any ideas?

[HACKERS] A few questions:

2003-03-31 Thread Christopher Kings-Lynne
1. Did that fix to not allow cluster on partial and non-null indexes get backpatched? 2. How can I deliberately cause a deadlock in order to test some code? Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.post