mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-22 22:37:01 +08:00
Both plannable queries and utility commands are now always executed within Portals, which have been revamped so that they can handle the load (they used to be good only for single SELECT queries). Restructure code to push command-completion-tag selection logic out of postgres.c, so that it won't have to be duplicated between simple and extended queries. initdb forced due to addition of a field to Query nodes.
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* spi_priv.h
|
|
* Server Programming Interface private declarations
|
|
*
|
|
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $Id: spi_priv.h,v 1.14 2003/05/02 20:54:35 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef SPI_PRIV_H
|
|
#define SPI_PRIV_H
|
|
|
|
#include "executor/spi.h"
|
|
|
|
|
|
typedef struct
|
|
{
|
|
uint32 processed; /* by Executor */
|
|
SPITupleTable *tuptable;
|
|
MemoryContext procCxt; /* procedure context */
|
|
MemoryContext execCxt; /* executor context */
|
|
MemoryContext savedcxt;
|
|
} _SPI_connection;
|
|
|
|
typedef struct
|
|
{
|
|
/* context containing _SPI_plan itself as well as subsidiary structures */
|
|
MemoryContext plancxt;
|
|
/* List of List of querytrees; one sublist per original parsetree */
|
|
List *qtlist;
|
|
/* List of plan trees --- length == # of querytrees, but flat list */
|
|
List *ptlist;
|
|
/* Argument types, if a prepared plan */
|
|
int nargs;
|
|
Oid *argtypes;
|
|
} _SPI_plan;
|
|
|
|
|
|
#define _SPI_CPLAN_CURCXT 0
|
|
#define _SPI_CPLAN_PROCXT 1
|
|
#define _SPI_CPLAN_TOPCXT 2
|
|
|
|
#endif /* SPI_PRIV_H */
|