Cosmetic PL/PgSQL fix: declare the second parameter plpgsql_dstring_append
as a const char *, so that we don't need to cast away a const in gram.y
This commit is contained in:
parent
1459d8c4b0
commit
d1b0d965b1
@ -4,7 +4,7 @@
|
||||
* procedural language
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.61 2004/08/20 22:00:14 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.62 2004/09/14 23:46:46 neilc Exp $
|
||||
*
|
||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||
*
|
||||
@ -1709,7 +1709,7 @@ read_sql_construct(int until,
|
||||
|
||||
lno = plpgsql_scanner_lineno();
|
||||
plpgsql_dstring_init(&ds);
|
||||
plpgsql_dstring_append(&ds, (char *) sqlstart);
|
||||
plpgsql_dstring_append(&ds, sqlstart);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
* procedural language
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.36 2004/08/30 02:54:42 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.37 2004/09/14 23:46:46 neilc Exp $
|
||||
*
|
||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||
*
|
||||
@ -80,7 +80,7 @@ plpgsql_dstring_free(PLpgSQL_dstring *ds)
|
||||
* ----------
|
||||
*/
|
||||
void
|
||||
plpgsql_dstring_append(PLpgSQL_dstring *ds, char *str)
|
||||
plpgsql_dstring_append(PLpgSQL_dstring *ds, const char *str)
|
||||
{
|
||||
int len = strlen(str);
|
||||
int needed = ds->used + len + 1;
|
||||
|
@ -3,7 +3,7 @@
|
||||
* procedural language
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.54 2004/09/13 20:09:21 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.55 2004/09/14 23:46:46 neilc Exp $
|
||||
*
|
||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||
*
|
||||
@ -716,7 +716,7 @@ extern void plpgsql_xact_cb(XactEvent event, TransactionId parentXid, void *arg)
|
||||
*/
|
||||
extern void plpgsql_dstring_init(PLpgSQL_dstring *ds);
|
||||
extern void plpgsql_dstring_free(PLpgSQL_dstring *ds);
|
||||
extern void plpgsql_dstring_append(PLpgSQL_dstring *ds, char *str);
|
||||
extern void plpgsql_dstring_append(PLpgSQL_dstring *ds, const char *str);
|
||||
extern char *plpgsql_dstring_get(PLpgSQL_dstring *ds);
|
||||
|
||||
/* ----------
|
||||
|
Loading…
Reference in New Issue
Block a user