agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedfunction calls from libpq.
2+ messages / 2 participants
[nested] [flat]
* function calls from libpq.
@ 1994-10-07 20:35 Ray E. Flanery Jr <flanery@tram.epm.ornl.gov>
0 siblings, 1 reply; 2+ messages in thread
From: Ray E. Flanery Jr @ 1994-10-07 20:35 UTC (permalink / raw)
To: legacy
I have a function defined for a database and want to access it through
libpq. PQfn seems to be set up for POSTGRES functions and it is not
clear how to do this through the portals. Any clues?
---------------------------------------------------------------------------
Raymond E. Flanery Jr., Director
Advanced Visualization Research Center, ORNL
(615)574-0630 flanery@msr.epm.ornl.gov
(615)574-0680 fax http://www.epm.ornl.gov/~flanery/
----------------------------------------------------------------------------
Cleveland Browns
---------------------------------------------------------------------------
"When the last individual of a race of living things breathes no more,
another heaven and another earth must pass before such a one can be again."
--- William Beebe
---------------------------------------------------------------------------
"Loyalty above all else, except honor" --- ??
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: function calls from libpq.
@ 1994-10-07 23:51 Paul M. Aoki <aoki@cs.berkeley.edu>
parent: Ray E. Flanery Jr <flanery@tram.epm.ornl.gov>
0 siblings, 0 replies; 2+ messages in thread
From: Paul M. Aoki @ 1994-10-07 23:51 UTC (permalink / raw)
To: Ray E. Flanery Jr <flanery@tram.epm.ornl.gov>; +Cc: legacy
flanery@tram.epm.ornl.gov (Ray E. Flanery Jr) writes:
> I have a function defined for a database and want to access it through
> libpq. PQfn seems to be set up for POSTGRES functions and it is not
> clear how to do this through the portals. Any clues?
to use PQfn, you need to register a C function in pg_proc with the
right argument types. there is no difference between calling built-in
C functions and user-defined C functions. the interface is documented
in the LIBPQ section of the reference manual. C functions cannot
return sets of tuples so there isn't much of a question about using
portals with them.
it is true that you can't use PQfn for POSTQUEL functions, if that's
what you mean. those you can call directly from the query language
(PQexec("retrieve (x=myfunc())")) so their interactions with portals
should be relatively clear (since the interactions are the same as
with any other query).
--
Paul M. Aoki | University of California at Berkeley
aoki@CS.Berkeley.EDU | Dept. of EECS, Computer Science Division (#1776)
| Berkeley, CA 94720-1776
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1994-10-07 23:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1994-10-07 20:35 function calls from libpq. Ray E. Flanery Jr <flanery@tram.epm.ornl.gov>
1994-10-07 23:51 ` Paul M. Aoki <aoki@cs.berkeley.edu>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox