Re: [HACKERS] [6.5.2] join problems ...

From: Mike Mascari <mascarim(at)yahoo(dot)com>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] [6.5.2] join problems ...
Date: 1999-09-19 17:21:46
Message-ID: 19990919172146.29199.rocketmail@web112.yahoomail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yes, sorry. Typo. I MEANT to put the parens around
the field list, but...

Mike Mascari

--- Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
wrote:
> <snip>
> > > AND (a.id,a.mid = b.id,b.mid)
> > > AND (b.catid,b.indid,b.divid =
> c.id,c.ppid,c.pid);
> > ... the above is not valid in PostgreSQL, it
> seems...
>
> I have to resort to looking at gram.y for this,
> since I currently have
> the Postgres parser in bits and pieces all over the
> garage floor ;)
>
> The expressions are *almost* valid for Postgres. The
> difference is
> that you need to put parens around each side of the
> "row expression":
>
> | '(' row_descriptor ')' row_op '('
> row_descriptor ')'
> {
> $$ = makeRowExpr($4, $2, $6);
> }
> ;
>
> I had implemented this using Date and Darwen as a
> reference, and afaik
> the SQL standard (and any sensible parser)
> *requires* parens around
> the row expression, referred to in gram.y as a "row
> descriptor".
>
> So, the following should work:
>
> AND ((a.id,a.mid) = (b.id,b.mid))
> AND ((b.catid,b.indid,b.divid) =
> (c.id,c.ppid,c.pid));
>
>
> - Thomas

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-09-19 17:25:07 Re: INSERT/DEFAULT VALUES broken?
Previous Message Ryan Kirkpatrick 1999-09-19 16:29:14 Re: [PATCHES] Patches for alpha w. cc