mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
* ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.98 2005/10/15 02:49:50 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/pl/tcl/pltcl.c,v 1.98.2.1 2005/11/22 18:23:31 momjian Exp $
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
@ -112,7 +112,7 @@ typedef struct pltcl_proc_desc
|
||||
int nargs;
|
||||
FmgrInfo arg_out_func[FUNC_MAX_ARGS];
|
||||
bool arg_is_rowtype[FUNC_MAX_ARGS];
|
||||
} pltcl_proc_desc;
|
||||
} pltcl_proc_desc;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
@ -126,7 +126,7 @@ typedef struct pltcl_query_desc
|
||||
Oid *argtypes;
|
||||
FmgrInfo *arginfuncs;
|
||||
Oid *argtypioparams;
|
||||
} pltcl_query_desc;
|
||||
} pltcl_query_desc;
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
@ -149,9 +149,9 @@ static pltcl_proc_desc *pltcl_current_prodesc = NULL;
|
||||
* Forward declarations
|
||||
**********************************************************************/
|
||||
static void pltcl_init_all(void);
|
||||
static void pltcl_init_interp(Tcl_Interp * interp);
|
||||
static void pltcl_init_interp(Tcl_Interp *interp);
|
||||
|
||||
static void pltcl_init_load_unknown(Tcl_Interp * interp);
|
||||
static void pltcl_init_load_unknown(Tcl_Interp *interp);
|
||||
|
||||
Datum pltcl_call_handler(PG_FUNCTION_ARGS);
|
||||
Datum pltclu_call_handler(PG_FUNCTION_ARGS);
|
||||
@ -163,34 +163,34 @@ static HeapTuple pltcl_trigger_handler(PG_FUNCTION_ARGS);
|
||||
|
||||
static pltcl_proc_desc *compile_pltcl_function(Oid fn_oid, Oid tgreloid);
|
||||
|
||||
static int pltcl_elog(ClientData cdata, Tcl_Interp * interp,
|
||||
static int pltcl_elog(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[]);
|
||||
static int pltcl_quote(ClientData cdata, Tcl_Interp * interp,
|
||||
static int pltcl_quote(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[]);
|
||||
static int pltcl_argisnull(ClientData cdata, Tcl_Interp * interp,
|
||||
static int pltcl_argisnull(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[]);
|
||||
static int pltcl_returnnull(ClientData cdata, Tcl_Interp * interp,
|
||||
static int pltcl_returnnull(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[]);
|
||||
|
||||
static int pltcl_SPI_execute(ClientData cdata, Tcl_Interp * interp,
|
||||
static int pltcl_SPI_execute(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[]);
|
||||
static int pltcl_process_SPI_result(Tcl_Interp * interp,
|
||||
static int pltcl_process_SPI_result(Tcl_Interp *interp,
|
||||
CONST84 char *arrayname,
|
||||
CONST84 char *loop_body,
|
||||
int spi_rc,
|
||||
SPITupleTable *tuptable,
|
||||
int ntuples);
|
||||
static int pltcl_SPI_prepare(ClientData cdata, Tcl_Interp * interp,
|
||||
static int pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[]);
|
||||
static int pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp * interp,
|
||||
static int pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[]);
|
||||
static int pltcl_SPI_lastoid(ClientData cdata, Tcl_Interp * interp,
|
||||
static int pltcl_SPI_lastoid(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[]);
|
||||
|
||||
static void pltcl_set_tuple_values(Tcl_Interp * interp, CONST84 char *arrayname,
|
||||
static void pltcl_set_tuple_values(Tcl_Interp *interp, CONST84 char *arrayname,
|
||||
int tupno, HeapTuple tuple, TupleDesc tupdesc);
|
||||
static void pltcl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc,
|
||||
Tcl_DString * retval);
|
||||
Tcl_DString *retval);
|
||||
|
||||
|
||||
/*
|
||||
@ -296,7 +296,7 @@ pltcl_init_all(void)
|
||||
* pltcl_init_interp() - initialize a Tcl interpreter
|
||||
**********************************************************************/
|
||||
static void
|
||||
pltcl_init_interp(Tcl_Interp * interp)
|
||||
pltcl_init_interp(Tcl_Interp *interp)
|
||||
{
|
||||
/************************************************************
|
||||
* Install the commands for SPI support in the interpreter
|
||||
@ -326,7 +326,7 @@ pltcl_init_interp(Tcl_Interp * interp)
|
||||
* table pltcl_modules (if it exists)
|
||||
**********************************************************************/
|
||||
static void
|
||||
pltcl_init_load_unknown(Tcl_Interp * interp)
|
||||
pltcl_init_load_unknown(Tcl_Interp *interp)
|
||||
{
|
||||
int spi_rc;
|
||||
int tcl_rc;
|
||||
@ -1270,7 +1270,7 @@ compile_pltcl_function(Oid fn_oid, Oid tgreloid)
|
||||
* pltcl_elog() - elog() support for PLTcl
|
||||
**********************************************************************/
|
||||
static int
|
||||
pltcl_elog(ClientData cdata, Tcl_Interp * interp,
|
||||
pltcl_elog(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[])
|
||||
{
|
||||
volatile int level;
|
||||
@ -1342,7 +1342,7 @@ pltcl_elog(ClientData cdata, Tcl_Interp * interp,
|
||||
* be used in SPI_execute query strings
|
||||
**********************************************************************/
|
||||
static int
|
||||
pltcl_quote(ClientData cdata, Tcl_Interp * interp,
|
||||
pltcl_quote(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[])
|
||||
{
|
||||
char *tmp;
|
||||
@ -1395,7 +1395,7 @@ pltcl_quote(ClientData cdata, Tcl_Interp * interp,
|
||||
* pltcl_argisnull() - determine if a specific argument is NULL
|
||||
**********************************************************************/
|
||||
static int
|
||||
pltcl_argisnull(ClientData cdata, Tcl_Interp * interp,
|
||||
pltcl_argisnull(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[])
|
||||
{
|
||||
int argno;
|
||||
@ -1452,7 +1452,7 @@ pltcl_argisnull(ClientData cdata, Tcl_Interp * interp,
|
||||
* pltcl_returnnull() - Cause a NULL return from a function
|
||||
**********************************************************************/
|
||||
static int
|
||||
pltcl_returnnull(ClientData cdata, Tcl_Interp * interp,
|
||||
pltcl_returnnull(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[])
|
||||
{
|
||||
FunctionCallInfo fcinfo = pltcl_current_fcinfo;
|
||||
@ -1535,7 +1535,7 @@ pltcl_subtrans_commit(MemoryContext oldcontext, ResourceOwner oldowner)
|
||||
}
|
||||
|
||||
static void
|
||||
pltcl_subtrans_abort(Tcl_Interp * interp,
|
||||
pltcl_subtrans_abort(Tcl_Interp *interp,
|
||||
MemoryContext oldcontext, ResourceOwner oldowner)
|
||||
{
|
||||
ErrorData *edata;
|
||||
@ -1568,7 +1568,7 @@ pltcl_subtrans_abort(Tcl_Interp * interp,
|
||||
* for the Tcl interpreter
|
||||
**********************************************************************/
|
||||
static int
|
||||
pltcl_SPI_execute(ClientData cdata, Tcl_Interp * interp,
|
||||
pltcl_SPI_execute(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[])
|
||||
{
|
||||
int my_rc;
|
||||
@ -1671,7 +1671,7 @@ pltcl_SPI_execute(ClientData cdata, Tcl_Interp * interp,
|
||||
* Shared code between pltcl_SPI_execute and pltcl_SPI_execute_plan
|
||||
*/
|
||||
static int
|
||||
pltcl_process_SPI_result(Tcl_Interp * interp,
|
||||
pltcl_process_SPI_result(Tcl_Interp *interp,
|
||||
CONST84 char *arrayname,
|
||||
CONST84 char *loop_body,
|
||||
int spi_rc,
|
||||
@ -1775,7 +1775,7 @@ pltcl_process_SPI_result(Tcl_Interp * interp,
|
||||
* and not save the plan currently.
|
||||
**********************************************************************/
|
||||
static int
|
||||
pltcl_SPI_prepare(ClientData cdata, Tcl_Interp * interp,
|
||||
pltcl_SPI_prepare(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[])
|
||||
{
|
||||
int nargs;
|
||||
@ -1920,7 +1920,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp * interp,
|
||||
* pltcl_SPI_execute_plan() - Execute a prepared plan
|
||||
**********************************************************************/
|
||||
static int
|
||||
pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp * interp,
|
||||
pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[])
|
||||
{
|
||||
int my_rc;
|
||||
@ -2140,7 +2140,7 @@ pltcl_SPI_execute_plan(ClientData cdata, Tcl_Interp * interp,
|
||||
* be used after insert queries
|
||||
**********************************************************************/
|
||||
static int
|
||||
pltcl_SPI_lastoid(ClientData cdata, Tcl_Interp * interp,
|
||||
pltcl_SPI_lastoid(ClientData cdata, Tcl_Interp *interp,
|
||||
int argc, CONST84 char *argv[])
|
||||
{
|
||||
char buf[64];
|
||||
@ -2156,7 +2156,7 @@ pltcl_SPI_lastoid(ClientData cdata, Tcl_Interp * interp,
|
||||
* of a given tuple
|
||||
**********************************************************************/
|
||||
static void
|
||||
pltcl_set_tuple_values(Tcl_Interp * interp, CONST84 char *arrayname,
|
||||
pltcl_set_tuple_values(Tcl_Interp *interp, CONST84 char *arrayname,
|
||||
int tupno, HeapTuple tuple, TupleDesc tupdesc)
|
||||
{
|
||||
int i;
|
||||
@ -2249,7 +2249,7 @@ pltcl_set_tuple_values(Tcl_Interp * interp, CONST84 char *arrayname,
|
||||
**********************************************************************/
|
||||
static void
|
||||
pltcl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc,
|
||||
Tcl_DString * retval)
|
||||
Tcl_DString *retval)
|
||||
{
|
||||
int i;
|
||||
char *outputstr;
|
||||
|
Reference in New Issue
Block a user