mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-08 18:29:25 +02:00
460b20a43f
now. Here some tested features, (examples included in the patch): 1.1) Subselects in the having clause 1.2) Double nested subselects 1.3) Subselects used in the where clause and in the having clause simultaneously 1.4) Union Selects using having 1.5) Indexes on the base relations are used correctly 1.6) Unallowed Queries are prevented (e.g. qualifications in the having clause that belong to the where clause) 1.7) Insert into as select 2) Queries using the having clause on view relations also work but there are some restrictions: 2.1) Create View as Select ... Having ...; using base tables in the select 2.1.1) The Query rewrite system: 2.1.2) Why are only simple queries allowed against a view from 2.1) ? 2.2) Select ... from testview1, testview2, ... having...; 3) Bug in ExecMergeJoin ?? Regards Stefan
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* rewriteManip.h--
|
|
*
|
|
*
|
|
*
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $Id: rewriteManip.h,v 1.8 1998/07/19 05:49:26 momjian Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef REWRITEMANIP_H
|
|
#define REWRITEMANIP_H
|
|
|
|
#include "nodes/nodes.h"
|
|
#include "nodes/parsenodes.h"
|
|
#include "rewrite/rewriteHandler.h"
|
|
|
|
/* RewriteManip.c */
|
|
void OffsetVarNodes(Node *node, int offset);
|
|
void
|
|
ChangeVarNodes(Node *node, int old_varno, int new_varno,
|
|
int sublevels_up);
|
|
void AddQual(Query *parsetree, Node *qual);
|
|
void AddHavingQual(Query *parsetree, Node *havingQual);
|
|
|
|
void AddNotQual(Query *parsetree, Node *qual);
|
|
void FixResdomTypes(List *user_tlist);
|
|
void FixNew(RewriteInfo *info, Query *parsetree);
|
|
|
|
void
|
|
HandleRIRAttributeRule(Query *parsetree, List *rtable, List *targetlist,
|
|
int rt_index, int attr_num, int *modified,
|
|
int *badpostquel);
|
|
void
|
|
HandleViewRule(Query *parsetree, List *rtable, List *targetlist,
|
|
int rt_index, int *modified);
|
|
|
|
#endif /* REWRITEMANIP_H */
|