Segmentation fault in 6.3.1 when using libpgtcl !!! - Mailing list pgsql-interfaces

From Constantin Teodorescu
Subject Segmentation fault in 6.3.1 when using libpgtcl !!!
Date
Msg-id 351E6224.579E94EE@flex.ro
Whole thread Raw
Responses Re: Segmentation fault in 6.3.1 when using libpgtcl !!!  (Randy Kunkee <kunkee@pluto.ops.NeoSoft.com>)
List pgsql-interfaces
I upgraded today to PostgreSQL 6.3.1 and I understood that are some
libpgtcl improvments (Randy Kunkee).

But I have encountered a bug (probably located in libpgtcl) that crash
the client (PgAccess).

To reproduce the error only with tclsh (not with PgAccess) you have to
follow exactly the following steps :

1. Get the database demo for PgAccess from the last PgAccess
distribution (0.86) or directly from
http://www.flex.ro/pgaccess/formdemo.sql (shift-click the link)
2. Create a database called formdemo and fill it with objects from
formdemo.sql (psql -e formdemo <formdemo.sql)
3. launch tclsh
4. Enter the following commands into tclsh

% load libpgtcl.so
% set dbc [pg_connect formdemo]
% pg_select $dbc "select * from pga_forms" rcd { puts $rcd(formname) }

You will get a segmentation fault immediatly after printing the first
form name ("A simple demo form")

If the last command would be
% pg_select $dbc "select formname from pga_forms" rcd { puts
$rcd(formname) }

you will get the names of the two forms founded in table pga_forms ("A
simple demo form","Phone book") without any error.
===================================================================
The PostgreSQL record for the form "Phone book" is big enough (2824
bytes) but less than 8Kb (record limit).
I think that it's a bug in the latest libpgtcl library in pg_select
function !

Please, Randy could you check it?

--
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA

pgsql-interfaces by date:

Previous
From: Constantin Teodorescu
Date:
Subject: Re: pgaccess difficulties on pg6.3
Next
From: Randy Kunkee
Date:
Subject: Re: Segmentation fault in 6.3.1 when using libpgtcl !!!