pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <Michael_Meskes@topmail.de>
To: pgsql-interfaces@postgreSQL.org
Subject: Re: ecpg with indicators not working
Date: Wed, 17 Feb 1999 08:38:16 +0100
Message-ID: <19990217083816.A8109@gmx.net> (raw)
In-Reply-To: <Pine.LNX.4.10.9902162055270.866-100000@hobbes.math.ksu.edu>
References: <36C0FD83.3A2C2F0A@pd.jaring.my>
	<Pine.LNX.4.10.9902162055270.866-100000@hobbes.math.ksu.edu>

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@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.Meskes@gmx.net          | Use PostgreSQL!

Attachments:

tj.pgc (text/plain, 1.2K) download main() { exec sql begin declare section; int 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, billing_terms,billing_terms_n,confirmation_method,confirmation_method_n; exec sql end declare section; 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); }

view thread (3+ messages)  latest in thread

Message-ID: <19990217083816.A8109@gmx.net>
Permalink:  ../19990217083816.A8109@gmx.net/
Also on:    postgresql.org/message-id/19990217083816.A8109@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: Michael_Meskes@topmail.de
  Subject: Re: ecpg with indicators not working
  In-Reply-To: <19990217083816.A8109@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox