pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedusing c++ for functions
3+ messages / 3 participants
[nested] [flat]
* using c++ for functions
@ 1998-07-13 07:06 David GROSS <David.Gross@wanadoo.fr>
0 siblings, 2 replies; 3+ messages in thread
From: David GROSS @ 1998-07-13 07:06 UTC (permalink / raw)
To: pgsql-interfaces
Hello,
I would like to know if it is possible to use C++ code
to define new functions in Postgres, something like :
create function ... returns ... as '...' language 'c++';
It works very well for C functions, but with C++ (on unix/linux
systems), postgres
can't find the function in the symbol table.
Does anyone knows ?
Thanks,
David
dgross@lri.fr
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] using c++ for functions
@ 1998-07-13 14:50 Thomas G. Lockhart <lockhart@alumnus.caltech.edu>
parent: David GROSS <David.Gross@wanadoo.fr>
1 sibling, 0 replies; 3+ messages in thread
From: Thomas G. Lockhart @ 1998-07-13 14:50 UTC (permalink / raw)
To: David.Gross@wanadoo.fr; +Cc: pgsql-interfaces
> I would like to know if it is possible to use C++ code
> to define new functions in Postgres...
> It works very well for C functions, but with C++ (on unix/linux
> systems), postgres can't find the function in the symbol table.
I don't know for sure, but I would suspect that C++ name mangling (or
something related) might be getting in the way. Have you looked at the
shared library with "nm" to see what the symbols actually are?
- Tom
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [INTERFACES] using c++ for functions
@ 1998-07-13 20:43 Goran Thyni <goran@bildbasen.se>
parent: David GROSS <David.Gross@wanadoo.fr>
1 sibling, 0 replies; 3+ messages in thread
From: Goran Thyni @ 1998-07-13 20:43 UTC (permalink / raw)
To: David.Gross@wanadoo.fr; +Cc: pgsql-interfaces
David GROSS wrote:
>
> Hello,
>
> I would like to know if it is possible to use C++ code
> to define new functions in Postgres, something like :
>
> create function ... returns ... as '...' language 'c++';
>
> It works very well for C functions, but with C++ (on unix/linux
> systems), postgres
> can't find the function in the symbol table.
>
David,
C++ does many things implicitely (behind your back)
and is therefore not suitable for embedded code
such as device drivers och loadable function.
Besides, I can see no reasons to choose C++ over C for
small things like this (except political, of course).
(Flames by private mail, please)
Hopefully we will be able to use PL/pgSQL or PL/Perl
for this in future releases of pgsql.
best regards,
Göran.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1998-07-13 20:43 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-07-13 07:06 using c++ for functions David GROSS <David.Gross@wanadoo.fr>
1998-07-13 14:50 ` Thomas G. Lockhart <lockhart@alumnus.caltech.edu>
1998-07-13 20:43 ` Goran Thyni <goran@bildbasen.se>
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