mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Subselects in FROM clause, per ISO syntax: FROM (SELECT ...) [AS] alias.
(Don't forget that an alias is required.) Views reimplemented as expanding to subselect-in-FROM. Grouping, aggregates, DISTINCT in views actually work now (he says optimistically). No UNION support in subselects/views yet, but I have some ideas about that. Rule-related permissions checking moved out of rewriter and into executor. INITDB REQUIRED!
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: execAmi.c,v 1.51 2000/08/03 19:19:30 tgl Exp $
|
||||
* $Id: execAmi.c,v 1.52 2000/09/29 18:21:28 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -44,6 +44,7 @@
|
||||
#include "executor/nodeSeqscan.h"
|
||||
#include "executor/nodeSort.h"
|
||||
#include "executor/nodeSubplan.h"
|
||||
#include "executor/nodeSubqueryscan.h"
|
||||
#include "executor/nodeUnique.h"
|
||||
|
||||
static Pointer ExecBeginScan(Relation relation, int nkeys, ScanKey skeys,
|
||||
@ -304,6 +305,14 @@ ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent)
|
||||
ExecIndexReScan((IndexScan *) node, exprCtxt, parent);
|
||||
break;
|
||||
|
||||
case T_TidScan:
|
||||
ExecTidReScan((TidScan *) node, exprCtxt, parent);
|
||||
break;
|
||||
|
||||
case T_SubqueryScan:
|
||||
ExecSubqueryReScan((SubqueryScan *) node, exprCtxt, parent);
|
||||
break;
|
||||
|
||||
case T_Material:
|
||||
ExecMaterialReScan((Material *) node, exprCtxt, parent);
|
||||
break;
|
||||
@ -348,10 +357,6 @@ ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent)
|
||||
ExecReScanAppend((Append *) node, exprCtxt, parent);
|
||||
break;
|
||||
|
||||
case T_TidScan:
|
||||
ExecTidReScan((TidScan *) node, exprCtxt, parent);
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(ERROR, "ExecReScan: node type %d not supported",
|
||||
nodeTag(node));
|
||||
|
Reference in New Issue
Block a user