Subject: dynamic linking in version 4.2

From: [email-masked] (Eric de Jonge)
Date: Thu, 28 Apr 1994 19:48:42 +0200 (MET DST)

Hi, just an upgrade to version 4.2 (DEC/ULTRIX)

DYNAMIC LINKING ISN'T WORKING?

% cc -c -g -G 0 -I/postgres/src/backend circle.c

* define function circle_in
(language="c", returntype = circle)
arg is (any)
as "/home/ejonge/pg4.2/circle.o"
\g

NOTICE:Apr 28 19:35:21:ProcedureDefine: type 'circle' is not yet defined
NOTICE:Apr 28 19:35:21:ProcedureDefine: creating a shell for type 'circle'
DEFINE

* define function circle_out
(language="c", returntype = any)
arg is (circle)
as "/home/ejonge/pg4.2/circle.o"
\g

NOTICE:Apr 28 19:35:26:ProcedureDefine: arg type 'circle' is only a shell
DEFINE

* define type circle
(internallength=24,
input=circle_in, output=circle_out)
\g

WARN:Apr 28 19:35:36:TypeDefine: function circle_out(any) does not exist

======================
ANYWAY TRY SOMETHING:
=====================

* create testkl(a=circle)\g

CREATE

* append testkl(a="(1.0,1.0,1.0)"::circle)\g

WARN:Apr 28 19:37:08:fmgr_info: function 0: cache lookup failed

=================================
What's this:
=> define function "creating a shell" ?
=> define type "function circle_out(any) does not exist" ????

=> append "fmgr_info: function 0: cache lookup failed" ???

WHAT'S WRONG!!!?????

Bye,
-- 
Eric de Jonge, [email-masked] 

===============================================================================
    To add/remove yourself from the POSTGRES mailing list: send mail with 
    the subject line ADD or DEL to "[email-masked]"

    If this fails, send mail to "[email-masked]" and
    a human will deal with it.  DO NOT post to the "postgres" mailing list.
===============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Thu, 28 Apr 94 11:56:11 -0700

> DYNAMIC LINKING ISN'T WORKING?

would you mind not yelling?  thanks.

> (language="c", returntype = any)
          ^^^^^^
this is wrong.  if i missed this in the user manual i apologize
(i'll check it out) but the right syntax is given in the ref manual 
and the regression tests.

i don't know why the argument type has to be "any" for circle_out.
(there's probably a good reason but i don't know what it is.)

in general if some piece of syntax from a paper or manual doesn't 
work, the regression tests contain examples that do work, so (hot 
tip) look in there for instant gratification.  i did try to test
out everything in the user manual but evidently missed some parts.
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki