-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of resjunk TargetEntry (used in GROUP BY) of subqueries
- Loading branch information
1 parent
be0edb1
commit b006580
Showing
4 changed files
with
92 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
\set ECHO none | ||
remove_provenance | ||
|
||
(1 row) | ||
city | ||
Berlin | ||
Berlin | ||
New York | ||
New York | ||
Paris | ||
Paris | ||
Paris | ||
(7 rows) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
\set ECHO none | ||
\pset format unaligned | ||
SET search_path TO provsql_test, provsql; | ||
|
||
CREATE TABLE resjunk AS | ||
SELECT | ||
city, | ||
provenance () | ||
FROM ( | ||
SELECT | ||
p1.city | ||
FROM | ||
personnel p1 | ||
JOIN personnel p2 ON p1.city = p2.city | ||
GROUP BY | ||
p1.city, | ||
p2.name, | ||
p2.id) t; | ||
|
||
SELECT | ||
remove_provenance ('resjunk'); | ||
|
||
ALTER TABLE resjunk | ||
DROP COLUMN provenance; | ||
|
||
SELECT | ||
* | ||
FROM | ||
resjunk | ||
ORDER BY | ||
city; | ||
|
||
DROP TABLE resjunk; |