Skip to content

Commit

Permalink
Merge pull request #40 from flightaware/BCK-5740
Browse files Browse the repository at this point in the history
Update Pgtcl to use Tcl Utf conversion routines to ensure all SQL passed into Postgres is legal.
  • Loading branch information
bovine authored Apr 2, 2021
2 parents 6e84e47 + 94bc3d5 commit 01d751e
Show file tree
Hide file tree
Showing 7 changed files with 318 additions and 99 deletions.
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dnl to configure the system for the local environment.
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------

AC_INIT([pgtcl], [2.7.5])
AC_INIT([pgtcl], [2.7.6])

#-----
# Version with patch stripped
Expand Down
6 changes: 4 additions & 2 deletions generic/pgtcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Pgtcl_Init(Tcl_Interp *interp)
* No really good way to do error handling here, since we
* don't know how we were loaded
*/
return FALSE;
return TCL_ERROR;
}

#endif
Expand All @@ -181,8 +181,10 @@ Pgtcl_Init(Tcl_Interp *interp)
if (tclversion >= 8.1)
Tcl_PutEnv("PGCLIENTENCODING=UNICODE");

/* register all pgtcl commands */
if(pgtclInitEncoding(interp) != TCL_OK)
return TCL_ERROR;

/* register all pgtcl commands */

for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) {
Tcl_CreateObjCommand(interp, cmdPtr->name,
Expand Down
Loading

0 comments on commit 01d751e

Please sign in to comment.