Re: ecpg with indicators not working

From: Michael Meskes <Michael_Meskes(at)topmail(dot)de>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: ecpg with indicators not working
Date: 1999-02-17 07:38:16
Message-ID: 19990217083816.A8109@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Tue, Feb 16, 1999 at 09:14:10PM -0600, James Thompson wrote:
> exec sql
> insert into
> customer(uid,id,name_first,name_middle,name_last,company,
>
> address1,address2,city,state,country,zip,phone_work,
>
> phone_home,phone_fax,email,date_entered,billing_terms,
> confirmation_method)
> values (:uid,:uid:id_n,:name_first:name_first_n,
> :name_middle:name_middle_n, :name_last:name_last_n,
> :company:company_n,:address1:address1_n,
> :address2:address2_n,:city:city_n,:state:state_n,
> :country:country_n,:zip:zip_n,:phone_work:phone_work_n,
>
> :phone_home:phone_home_n,:phone_fax:phone_fax_n,:email:email_n,
> date('now'),:billing_terms:billing_terms_n,
> :confirmation_method:confirmation_method_n);
>
>
> Adding the indicators to the above statement causes ecpg(from the 6.4.2
> distro) to seg fault while processing the statement. I defined each
> indicator as the original var name with _n added to the end. I tried
> type int and long. The statement preprocesses fine without the indicator
> vars.

Strange. Please try the attached test file. I defined all your variables as
int and it works with ecpg versions 2.4.4 (PG 6.4.1), 2.4.9 and 2.5.0.

> I dont know the proper method for looking into core files but by trial and
> error I got gdb to produce (is this correct way to do this?)

Yes.

> [jamest(at)calvin obelib]$ gdb ecpg core
> GNU gdb 4.17
> ...
> #0 0x8054d81 in ECPGdump_a_type ()
> (gdb) bt
> ...

Could you please check where in ECPGdump_a_type it dumps core? The function
is a pretty short one.

Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael(dot)Meskes(at)gmx(dot)net | Use PostgreSQL!

Attachment Content-Type Size
tj.pgc text/plain 1.2 KB

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Dave Page 1999-02-17 10:40:41 RE: [INTERFACES] pgAdmin v6.4.2
Previous Message Kirill Sapelkin 1999-02-17 05:44:20 gnu readline