1999-01-27 17:15:22 +01:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
2002-10-15 01:49:20 +02:00
|
|
|
* spi_priv.h
|
1999-01-27 17:15:22 +01:00
|
|
|
* Server Programming Interface private declarations
|
|
|
|
*
|
2003-08-04 04:40:20 +02:00
|
|
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
2002-10-15 01:49:20 +02:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
2003-08-04 04:40:20 +02:00
|
|
|
* $Id: spi_priv.h,v 1.16 2003/08/04 02:40:13 momjian Exp $
|
1999-01-27 17:15:22 +01:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef SPI_PRIV_H
|
|
|
|
#define SPI_PRIV_H
|
|
|
|
|
1999-07-14 03:20:30 +02:00
|
|
|
#include "executor/spi.h"
|
1999-01-27 17:15:22 +01:00
|
|
|
|
2002-10-15 01:49:20 +02:00
|
|
|
|
1999-01-27 17:15:22 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint32 processed; /* by Executor */
|
|
|
|
SPITupleTable *tuptable;
|
2000-06-28 05:33:33 +02:00
|
|
|
MemoryContext procCxt; /* procedure context */
|
|
|
|
MemoryContext execCxt; /* executor context */
|
1999-01-27 17:15:22 +01:00
|
|
|
MemoryContext savedcxt;
|
|
|
|
} _SPI_connection;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2003-08-04 02:43:34 +02:00
|
|
|
/*
|
|
|
|
* context containing _SPI_plan itself as well as subsidiary
|
|
|
|
* structures
|
|
|
|
*/
|
2001-05-21 16:22:19 +02:00
|
|
|
MemoryContext plancxt;
|
2002-10-15 01:49:20 +02:00
|
|
|
/* List of List of querytrees; one sublist per original parsetree */
|
1999-05-13 09:29:22 +02:00
|
|
|
List *qtlist;
|
2002-10-15 01:49:20 +02:00
|
|
|
/* List of plan trees --- length == # of querytrees, but flat list */
|
1999-01-27 17:15:22 +01:00
|
|
|
List *ptlist;
|
2002-10-15 01:49:20 +02:00
|
|
|
/* Argument types, if a prepared plan */
|
1999-01-27 17:15:22 +01:00
|
|
|
int nargs;
|
|
|
|
Oid *argtypes;
|
|
|
|
} _SPI_plan;
|
|
|
|
|
2002-10-15 01:49:20 +02:00
|
|
|
|
1999-01-27 17:15:22 +01:00
|
|
|
#define _SPI_CPLAN_CURCXT 0
|
|
|
|
#define _SPI_CPLAN_PROCXT 1
|
|
|
|
#define _SPI_CPLAN_TOPCXT 2
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* SPI_PRIV_H */
|