Re: libpgtcl pg_execute

Поиск
Список
Период
Сортировка
От ljb
Тема Re: libpgtcl pg_execute
Дата
Msg-id a5uku1$149j$1@jupiter.hub.org
обсуждение исходный текст
Ответ на Re: May we use libpgtcl pg_execute? / Was: pg_select...  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: libpgtcl pg_execute
Re: libpgtcl pg_execute
Список pgsql-interfaces
tgl@sss.pgh.pa.us wrote:

> Looking at the CVS logs, I see that Jan added this command; he should be
> blamed for not having added any documentation.  Feel free to contribute
> a documentation patch ...

I have documentation, but just as plain text. Unfortunately I don't have
the tools or know-how to get it (correctly) into SGML at this time.
What should I do?

> What's wrong with the -oid code?

pg_execute throws an error when you use -oid (with no error message), because
the return value check on Tcl_SetVar is wrong.  Here's the fix:

*** src/interfaces/libpgtcl/pgtclCmds.c.orig    Mon Dec  3 09:49:46 2001
--- src/interfaces/libpgtcl/pgtclCmds.c    Mon Feb 18 17:25:27 2002
***************
*** 909,915 ****          sprintf(oid_buf, "%u", PQoidValue(result));         if (Tcl_SetVar(interp, oid_varname,
oid_buf,
!                        TCL_LEAVE_ERR_MSG) != TCL_OK)         {             PQclear(result);             return
TCL_ERROR;
--- 909,915 ----          sprintf(oid_buf, "%u", PQoidValue(result));         if (Tcl_SetVar(interp, oid_varname,
oid_buf,
!                        TCL_LEAVE_ERR_MSG) == NULL)         {             PQclear(result);             return
TCL_ERROR;


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: May we use libpgtcl pg_execute? / Was: pg_select...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: libpgtcl pg_execute