Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update statements: references to a table do not bind to its alias #6246

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed
Labels
bug Something isn't working minor SQL

Comments

@monetdb-team
Copy link

Date: 2017-03-19 22:06:05 +0100
From: Dean De Leo <>
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2017-04-25 18:56:16 +0200

Comment 25158

Date: 2017-03-19 22:06:05 +0100
From: Dean De Leo <>

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36
Build Identifier:

Given an update statement such as:
UPDATE ...
SET ...
FROM ( subquery_with_clause ) AS ident
WHERE ...;

The identifier `ident' should act as a valid table reference for both the SET and WHERE clauses. Current development version of MonetDB seems to ignore it, instead raising an error such as: SELECT: no such column 'alias.xxx'

Reproducible: Always

Steps to Reproduce:

  1. See the attached repro

Actual Results:

An error is raised in the semantic stage

Expected Results:

The given alias should be bound to the referred table

Comment 25159

Date: 2017-03-19 22:06:59 +0100
From: Dean De Leo <>

Created attachment 545
repro.sql

Attached file: repro.sql (application/sql, 659 bytes)
Description: repro.sql

Comment 25162

Date: 2017-03-20 21:27:23 +0100
From: @njnes

fixed in dec2016, ie added missing alias handling.

Comment 25163

Date: 2017-03-20 22:38:15 +0100
From: MonetDB Mercurial Repository <>

Changeset 235ab012ead8 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=235ab012ead8

Changeset description:

fixed bug #6246, ie handle alias in with subquery

Comment 25269

Date: 2017-04-25 18:56:16 +0200
From: MonetDB Mercurial Repository <>

Changeset 4ac696b61828 made by Dean De Leo deandeleo@hotmail.co.uk in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=4ac696b61828

Changeset description:

Backport hg://63221:235ab012ead8

fixed bug #6246, ie handle alias in with subquery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor SQL
Projects
None yet
Development

No branches or pull requests

2 participants