More info on that assert I've hit.

Compile 8.1.6 with configuration options:

./configure --with-perl --enable-debug --enable-cassert

(not sure if --perl is relevent or not, I think not).

This is on Fedora Core 5 on x86-32.

Execute, on a fresh database, the following sql, to recreate the bug:

CREATE TABLE foo
(
    some_data VARCHAR(32)
,    row_date DATE
);

CREATE TABLE bar
(
    some_data VARCHAR(32)
,    row_date DATE
);

CREATE TABLE quux
(
    some_data VARCHAR(32)
,    more_data VARCHAR(32)
);


CREATE OR REPLACE VIEW bazz AS
SELECT
       ('bar: ' || bar.row_date) :: TEXT AS action,
       quux.more_data AS more_data,
       bar.row_date AS row_date
FROM
       bar
       JOIN quux
       ON bar.some_data = quux.some_data
UNION ALL
SELECT
       ('foo: ' || foo.row_date) :: TEXT AS action,
       quux.more_data AS more_data,
       foo.row_date AS row_date
FROM
       foo
       JOIN quux
       ON foo.some_data = quux.some_data
;

SELECT action, more_data FROM bazz;



---------------------------(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

Reply via email to