Re[4]: [HACKERS] Re: [QUESTIONS] libpq++ - Mailing list pgsql-hackers

From Leo Shuster
Subject Re[4]: [HACKERS] Re: [QUESTIONS] libpq++
Date
Msg-id 735e39bf9b3e3dc19cde56bf868a5944
Whole thread Raw
List pgsql-hackers
>My program crash with core dump if compiled without "-fexternal-templates"
>But it happens only when PgEnv used like
>PgEnv env("",host_name,...
>that is with explicit constructor.
    Strange indeed.  GNU's implementation of string class is not
    the greatest and it tends to crash in the most unexpected
    situations.  There are some tricks, however, you can use
    to prevent that.  I'll double-check the code and see if
    there anything can be done to prevent the crashes.

>In my distribution (postgresql-6.1.tar.gz) src/libpq++/example/* are not ever
>contain PgEnv word. But I indeed need of PgEnv(...) because it is more
>suitable than dinamical changing environment on various hosts
    I'll check the examples.  Basically, there is not much to the PgEnv's
    usage: it is simply a storage class for the Postgres environment.
    It stores either default parameters or whatever you send to it.
    There is just the constructor call and that's it.  All the other
    methods are simply accessors.

>May be there are some special tricks when gdb is used for templates
>classes calls tracing?
    I am not aware of any.  I can't consider myself an expert on gdb,
    so if anyone has some hints, I'll gladly listen to them.

Leo

------------------------------

pgsql-hackers by date:

Previous
From: Frank Dana
Date:
Subject: Re: [HACKERS] Problem with copying abstimes
Next
From: Gord Pusnik
Date:
Subject: [HACKERS] (no subject)