The attached sql file creates some table infrastructure and then tries to
explain a query.  I get the following error on CVS HEAD:

psql:bogus_varattno_error.sql:23: ERROR:  bogus varattno for OUTER var: 5

In my real data, when I attempt to run the query I get the error:
ERROR:  invalid attribute number 5

But in the test setup it just returns an empty set.

Any ideas what is causing this?  Is it my query, or is something broken
somewhere?  I tend to think the latter, since this error message does not
feel like one that a user would get and be expected to know what to do

If God had intended Man to Watch TV, He would have given him Rabbit
CREATE TABLE filenames (
  recdate timestamp NOT NULL,
  season smallint NOT NULL,
  partno smallint,
  station text NOT NULL,
  eptitle text NOT NULL
CREATE TABLE episodes (
  epnum text NOT NULL,
  season smallint NOT NULL,
  title text NOT NULL,
  partno smallint

CREATE TABLE episodes_chld () INHERITS (episodes);

\set tsearch_sql `pg_config --sharedir`/contrib/tsearch2.sql
\i :tsearch_sql
EXPLAIN SELECT epnum, filenames.* FROM filenames LEFT JOIN episodes ON (
  filenames.season = episodes.season AND
  strip(to_tsvector(filenames.eptitle)) = strip(to_tsvector(episodes.title)) AND
  filenames.partno IS NOT DISTINCT FROM episodes.partno)

-- vim: set ft=psql ts=2 sw=2 expandtab :
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to