Re: PG8: set search_path at compile time?

Mike Aubury <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAGAq4WFXOz0ddEfp6hXoqXFSuvb+q2doUyjvhn2nd9UVQXvoiA@mail.gmail.com>
I think a neater way of doing this is to use the "DEFAULT_SQL" - which is
run whenever a database connection is made.

In the etc/convertsql/INFORMIX-POSTGRES8.cnv file - set something like :

DEFAULT_SQL 2 = set search_path TO ....


That way - you dont need to hack the .c files...

(You should be able to create a file anywhere called INFORMIX-POSTGRES8.cnv
and point to it using
A4GL_SQLCNVPATH if you're worried about it getting overwritten)



On 9 November 2013 21:59, W. Haslbeck <[email protected]> wrote:

> Hello,
>
> is there a way to set the PostgreSQL search_path (driver pg8) at compile
> time?
> Instructions like CONSTRUCT BY NAME doesn't accept the
> "schema.table.column" schema (in contrast to e.g. DEFINE where you can
> say "define var like schema.table.column"), so when the needed schema is
> not in the search_path at compile time, you get an compliation error.
>
> At the moment I use a bit modified version of pg8.c, which sets the
> search_path at the end of A4GLSQLLIB_A4GLSQL_init_connection_internal,
> but I'm not very pleased with this option...
>
> Walter
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models.
> Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and
> register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.