Error arguments in pl_exec.c
I get the following warnings in HEAD
pl_exec.c: In function ‘exec_stmt_raise’:
pl_exec.c:2538: warning: format not a string literal and no format arguments
pl_exec.c:2538: warning: format not a string literal and no format arguments
Attached patch seems right to me - objections?
//Magnus
Attachments:
plexec.difftext/x-diff; name=plexec.diffDownload
Index: pl_exec.c
===================================================================
RCS file: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v
retrieving revision 1.224
diff -c -r1.224 pl_exec.c
*** pl_exec.c 5 Nov 2008 00:07:54 -0000 1.224
--- pl_exec.c 20 Nov 2008 14:58:11 -0000
***************
*** 2538,2545 ****
ereport(stmt->elog_level,
(err_code ? errcode(err_code) : 0,
errmsg_internal("%s", err_message),
! (err_detail != NULL) ? errdetail(err_detail) : 0,
! (err_hint != NULL) ? errhint(err_hint) : 0));
estate->err_text = NULL; /* un-suppress... */
--- 2538,2545 ----
ereport(stmt->elog_level,
(err_code ? errcode(err_code) : 0,
errmsg_internal("%s", err_message),
! (err_detail != NULL) ? errdetail("%s", err_detail) : 0,
! (err_hint != NULL) ? errhint("%s", err_hint) : 0));
estate->err_text = NULL; /* un-suppress... */
Magnus Hagander <magnus@hagander.net> writes:
I get the following warnings in HEAD
pl_exec.c: In function ‘exec_stmt_raise’:
pl_exec.c:2538: warning: format not a string literal and no format arguments
pl_exec.c:2538: warning: format not a string literal and no format argumentsAttached patch seems right to me - objections?
ick. that's actually a security hole. Thankfully it's new code in cvs head.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's Slony Replication support!
Magnus Hagander <magnus@hagander.net> writes:
Attached patch seems right to me - objections?
Good catch. What gave you these warnings exactly?
regards, tom lane