Re: [BUGS] "--enable-thread-safety" fails on snapshot version

2007-06-11 Thread George Sakkis

On 6/11/07, Tom Lane <[EMAIL PROTECTED]> wrote:


"George Sakkis" <[EMAIL PROTECTED]> writes:
> After digging in config.log, the error turns out to be the lack of the
> a test file:

> conftest.c:144:43: ./src/test/thread/thread_test.c: No such file or directory

> Actually the whole src/test directory is missing from the snapshot
> versions.

It's there AFAICS:

$ tar tfz postgresql-snapshot.tar.gz | grep src/test/thread
postgresql-snapshot/src/test/thread
postgresql-snapshot/src/test/thread/Makefile
postgresql-snapshot/src/test/thread/README
postgresql-snapshot/src/test/thread/thread_test.c
$

regards, tom lane



Ok, got it; I was downloading the base-snapshot.tar.gz. I was misled
by the note, "The -base package is the only one that is required for
successful installation"; I didn't guess this implies "at least with
the defaut configure settings".

Thanks,
George

--
"If I have been able to see further, it was only because I stood on
the shoulders of million monkeys."

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[BUGS] "--enable-thread-safety" fails on snapshot version

2007-06-11 Thread George Sakkis

I tried to configure with "--enable-thread-safety" the snapshot
version and it fails with:

"This platform is not thread-safe.  Check the file 'config.log'for the
exact reason."

After digging in config.log, the error turns out to be the lack of the
a test file:

conftest.c:144:43: ./src/test/thread/thread_test.c: No such file or directory

Actually the whole src/test directory is missing from the snapshot
versions. After copying it over from my stable version (8.2.3), it
configures fine. Is this is an accidental omission or deliberate ?

Thanks,

George


--
"If I have been able to see further, it was only because I stood on
the shoulders of million monkeys."

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[BUGS] BUG #3308: Nested outer join gives wrong results

2007-05-25 Thread George Sakkis

The following bug has been logged online:

Bug reference:  3308
Logged by:  George Sakkis
Email address:  [EMAIL PROTECTED]
PostgreSQL version: 8.2.3
Operating system:   Linux
Description:Nested outer join gives wrong results
Details: 

I have the following two subqueries, both returning a single column q_id;
also the result set of A is a strict superset of B:

Query A
---
SELECT query.id as q_id
FROM ranker, run, query
WHERE ranker.id = 72 AND 
  run.id = ranker.run_id AND 
  query.set_id = run.set_id

(966 rows)

Query B
---
SELECT serp_result.q_id
FROM serp_result LEFT OUTER JOIN editor_rating using (q_id,norm_url)
WHERE serp_result.ranker_id = 72 AND 
  serp_result.rank <= 1 
  AND editor_rating.grade is null

(251 rows)


Now, the left outer join of A and B should be equal to A in this case since
A is a superset of B. If I save A in a temp table and use this for the join,
that's indeed the result:

SELECT query.id as q_id INTO TEMP t1
FROM ranker, run, query
WHERE ranker.id = 72 AND 
  run.id = ranker.run_id AND 
  query.set_id = run.set_id

SELECT *
FROM t1
LEFT JOIN (
  SELECT serp_result.q_id
  FROM serp_result LEFT OUTER JOIN editor_rating using (q_id,norm_url)
  WHERE serp_result.ranker_id = 72 AND serp_result.rank <= 1 AND
editor_rating.grade is null
) AS t2 USING (q_id)
;

(966 rows)

Likewise if I save B into a temp table and join with A:

SELECT serp_result.q_id into TEMP t2
FROM serp_result LEFT OUTER JOIN editor_rating using (q_id,norm_url)
WHERE serp_result.ranker_id = 72 AND serp_result.rank <= 1 AND
editor_rating.grade is null

SELECT *
FROM (
  SELECT query.id as q_id
  FROM ranker, run, query
  WHERE ranker.id = 72 AND 
run.id = ranker.run_id AND 
query.set_id = run.set_id
) AS t1
LEFT JOIN t2 USING (q_id)

(966 rows)

If I don't use temp tables though, the result is equal to B instead:

SELECT *
FROM (
  SELECT query.id as q_id
  FROM ranker, run, query
  WHERE ranker.id = 72 AND 
run.id = ranker.run_id AND 
query.set_id = run.set_id
) AS t1
LEFT JOIN (
  SELECT serp_result.q_id
  FROM serp_result LEFT OUTER JOIN editor_rating using (q_id,norm_url)
  WHERE serp_result.ranker_id = 72 AND 
serp_result.rank <= 1 
AND editor_rating.grade is null
) AS t2 USING (q_id)
;

(251 rows)

What gives ?

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match