mirror of
https://github.com/postgres/postgres.git
synced 2026-02-17 09:42:54 -05:00
This commit reverts1adf16b8fb,87c21bb941, and subsequent fixes and improvements includingdf64c81ca9,c99ef1811a,9dfcac8e15,885742b9f8,842c9b2705,fcf80c5d5f,96c7381c4c,f4fc7cb54b,60ae37a8bc,259c96fa8f,449cdcd486,3ca43dbbb6,2a679ae94e,3a82c689fd,fbd4321fd5,d53a4286d7,c086896625,4e5d6c4091,04158e7fa3. The reason for reverting is security issues related to repeatable name lookups (CVE-2014-0062). Even though04158e7fa3solved part of the problem, there are still remaining issues, which aren't feasible to even carefully analyze before the RC deadline. Reported-by: Noah Misch, Robert Haas Discussion: https://postgr.es/m/20240808171351.a9.nmisch%40google.com Backpatch-through: 17
52 lines
1.9 KiB
C
52 lines
1.9 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* ruleutils.h
|
|
* Declarations for ruleutils.c
|
|
*
|
|
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* src/include/utils/ruleutils.h
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef RULEUTILS_H
|
|
#define RULEUTILS_H
|
|
|
|
#include "nodes/nodes.h"
|
|
#include "nodes/parsenodes.h"
|
|
#include "nodes/pg_list.h"
|
|
|
|
struct Plan; /* avoid including plannodes.h here */
|
|
struct PlannedStmt;
|
|
|
|
/* Flags for pg_get_indexdef_columns_extended() */
|
|
#define RULE_INDEXDEF_PRETTY 0x01
|
|
#define RULE_INDEXDEF_KEYS_ONLY 0x02 /* ignore included attributes */
|
|
|
|
extern char *pg_get_indexdef_string(Oid indexrelid);
|
|
extern char *pg_get_indexdef_columns(Oid indexrelid, bool pretty);
|
|
extern char *pg_get_indexdef_columns_extended(Oid indexrelid,
|
|
bits16 flags);
|
|
extern char *pg_get_querydef(Query *query, bool pretty);
|
|
|
|
extern char *pg_get_partkeydef_columns(Oid relid, bool pretty);
|
|
extern char *pg_get_partconstrdef_string(Oid partitionId, char *aliasname);
|
|
|
|
extern char *pg_get_constraintdef_command(Oid constraintId);
|
|
extern char *deparse_expression(Node *expr, List *dpcontext,
|
|
bool forceprefix, bool showimplicit);
|
|
extern List *deparse_context_for(const char *aliasname, Oid relid);
|
|
extern List *deparse_context_for_plan_tree(struct PlannedStmt *pstmt,
|
|
List *rtable_names);
|
|
extern List *set_deparse_context_plan(List *dpcontext,
|
|
struct Plan *plan, List *ancestors);
|
|
extern List *select_rtable_names_for_explain(List *rtable,
|
|
Bitmapset *rels_used);
|
|
extern char *generate_collation_name(Oid collid);
|
|
extern char *generate_opclass_name(Oid opclass);
|
|
extern char *get_range_partbound_string(List *bound_datums);
|
|
|
|
extern char *pg_get_statisticsobjdef_string(Oid statextid);
|
|
|
|
#endif /* RULEUTILS_H */
|