BUG #4035: sql table aliases do not work

From: "RGF" <RussFrith(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4035: sql table aliases do not work
Date: 2008-03-14 20:53:08
Message-ID: 200803142053.m2EKr80T037097@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4035
Logged by: RGF
Email address: RussFrith(at)hotmail(dot)com
PostgreSQL version: latest
Operating system: Windows XP
Description: sql table aliases do not work
Details:

the following sql code throws the following error:
ERROR: relation "tonodes" does not exist
SQL state: 42P01
Context: SQL statement "update tonodes set tonodes.cost = case when
tonodes.cost is NULL then fromnodes.cost + paths.cost when fromnodes.cost +
paths.cost < tonodes.cost then fromnodes.cost + paths.cost else tonodes.cost
end, tonodes.pathid = paths.pathid from nodes as fromnodes inner join paths
on paths.fromnodeid = fromnodes.nodeid inner join tonodes on tonodes.nodeid
= paths.tonodeid where fromnodes.nodeid = $1 and (tonodes.cost is NULL or
fromnodes.cost + paths.cost < tonodes.cost) and tonodes.calculated = 0"
PL/pgSQL function "dijkstra_resolve" line 53 at SQL statement

The tables referenced (nodes and paths) exist and have data. The SQL works
in MS SQL Server 2000

Pls help

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Matt Magoffin 2008-03-14 21:17:42 BUG #4036: Nested xpath() calls lose namespace support
Previous Message Tom Lane 2008-03-14 14:42:09 Re: BUG #4030: Inconsistency: ORDER BY clauses involving column aliases