8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.82 2002/12/17 15:51:59 tgl Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.83 2002/12/30 22:10:54 tgl Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -32,11 +32,11 @@ static _SPI_connection *_SPI_current = NULL;
32
32
static int _SPI_connected = -1 ;
33
33
static int _SPI_curid = -1 ;
34
34
35
- static int _SPI_execute (char * src , int tcount , _SPI_plan * plan );
35
+ static int _SPI_execute (const char * src , int tcount , _SPI_plan * plan );
36
36
static int _SPI_pquery (QueryDesc * queryDesc , bool runit , int tcount );
37
37
38
38
static int _SPI_execute_plan (_SPI_plan * plan ,
39
- Datum * Values , char * Nulls , int tcount );
39
+ Datum * Values , const char * Nulls , int tcount );
40
40
41
41
static void _SPI_cursor_operation (Portal portal , bool forward , int count ,
42
42
CommandDest dest );
@@ -187,7 +187,7 @@ SPI_pop(void)
187
187
}
188
188
189
189
int
190
- SPI_exec (char * src , int tcount )
190
+ SPI_exec (const char * src , int tcount )
191
191
{
192
192
int res ;
193
193
@@ -205,7 +205,7 @@ SPI_exec(char *src, int tcount)
205
205
}
206
206
207
207
int
208
- SPI_execp (void * plan , Datum * Values , char * Nulls , int tcount )
208
+ SPI_execp (void * plan , Datum * Values , const char * Nulls , int tcount )
209
209
{
210
210
int res ;
211
211
@@ -226,7 +226,7 @@ SPI_execp(void *plan, Datum *Values, char *Nulls, int tcount)
226
226
}
227
227
228
228
void *
229
- SPI_prepare (char * src , int nargs , Oid * argtypes )
229
+ SPI_prepare (const char * src , int nargs , Oid * argtypes )
230
230
{
231
231
_SPI_plan * plan ;
232
232
@@ -382,7 +382,7 @@ SPI_copytupleintoslot(HeapTuple tuple, TupleDesc tupdesc)
382
382
383
383
HeapTuple
384
384
SPI_modifytuple (Relation rel , HeapTuple tuple , int natts , int * attnum ,
385
- Datum * Values , char * Nulls )
385
+ Datum * Values , const char * Nulls )
386
386
{
387
387
MemoryContext oldcxt = NULL ;
388
388
HeapTuple mtuple ;
@@ -455,7 +455,7 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
455
455
}
456
456
457
457
int
458
- SPI_fnumber (TupleDesc tupdesc , char * fname )
458
+ SPI_fnumber (TupleDesc tupdesc , const char * fname )
459
459
{
460
460
int res ;
461
461
Form_pg_attribute sysatt ;
@@ -693,7 +693,7 @@ SPI_freetuptable(SPITupleTable *tuptable)
693
693
* Open a prepared SPI plan as a portal
694
694
*/
695
695
Portal
696
- SPI_cursor_open (char * name , void * plan , Datum * Values , char * Nulls )
696
+ SPI_cursor_open (const char * name , void * plan , Datum * Values , const char * Nulls )
697
697
{
698
698
static int unnamed_portal_count = 0 ;
699
699
@@ -827,7 +827,7 @@ SPI_cursor_open(char *name, void *plan, Datum *Values, char *Nulls)
827
827
* Find the portal of an existing open cursor
828
828
*/
829
829
Portal
830
- SPI_cursor_find (char * name )
830
+ SPI_cursor_find (const char * name )
831
831
{
832
832
return GetPortalByName (name );
833
833
}
@@ -944,7 +944,7 @@ spi_printtup(HeapTuple tuple, TupleDesc tupdesc, DestReceiver *self)
944
944
* If plan != NULL, just prepare plan tree, else execute immediately.
945
945
*/
946
946
static int
947
- _SPI_execute (char * src , int tcount , _SPI_plan * plan )
947
+ _SPI_execute (const char * src , int tcount , _SPI_plan * plan )
948
948
{
949
949
StringInfoData stri ;
950
950
List * raw_parsetree_list ;
@@ -1110,7 +1110,8 @@ _SPI_execute(char *src, int tcount, _SPI_plan *plan)
1110
1110
}
1111
1111
1112
1112
static int
1113
- _SPI_execute_plan (_SPI_plan * plan , Datum * Values , char * Nulls , int tcount )
1113
+ _SPI_execute_plan (_SPI_plan * plan , Datum * Values , const char * Nulls ,
1114
+ int tcount )
1114
1115
{
1115
1116
List * query_list_list = plan -> qtlist ;
1116
1117
List * plan_list = plan -> ptlist ;
0 commit comments