mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Redesign DISTINCT ON as discussed in pgsql-sql 1/25/00: syntax is now
SELECT DISTINCT ON (expr [, expr ...]) targetlist ... and there is a check to make sure that the user didn't specify an ORDER BY that's incompatible with the DISTINCT operation. Reimplement nodeUnique and nodeGroup to use the proper datatype-specific equality function for each column being compared --- they used to do bitwise comparisons or convert the data to text strings and strcmp(). (To add insult to injury, they'd look up the conversion functions once for each tuple...) Parse/plan representation of DISTINCT is now a list of SortClause nodes. initdb forced by querytree change...
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.41 2000/01/26 05:56:49 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.42 2000/01/27 18:11:36 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -312,7 +312,7 @@ DefineQueryRewrite(RuleStmt *stmt)
|
||||
/*
|
||||
* DISTINCT on view is not supported
|
||||
*/
|
||||
if (query->uniqueFlag != NULL)
|
||||
if (query->distinctClause != NIL)
|
||||
elog(ERROR, "DISTINCT not supported in views");
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user