Return-Path: mao
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA05073; Mon, 15 Feb 93 21:39:17 -0800
Message-Id: <9302160539.AA05073@postgres.Berkeley.EDU>
From: <mao@postgres.berkeley.edu>
Subject: Re: Creating one .o file?
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of Mon, 15 Feb 93 21:24:54 EST.
             <9302160224.AA04347@postgres.Berkeley.EDU> 
Date: Mon, 15 Feb 93 21:39:37 PST

In message <9302160224.AA04347@postgres.Berkeley.EDU> you write:

>  	I'm having a problem on a project that I'm working on.  My code
>  for user defined types are divided up into many .o files and I'm
>  having problems (link error in PostGres while using 'load' command) when
>  a function from one .o file calls a function in another .o file that
>  has been previously loaded.
>  
>  	My question:  is there a way around this problem without putting 
>  all my code into one C file and compiling it?  Or maybe there's a way
>  of compiling a bunch of C files and creating one .o file?
>  
>  	Any suggestions?  Thank you very much for your time.

one thing that you can do is to look up the function you want to run by
name in the system catalogs, and then call the function manager to invoke
it.  if it's not already loaded, and it exists in a different .o file,
it'll automatically be loaded for you.  this saves you from having to worry
about the order in which .o files get loaded, and lets you keep your code
modularized.

there's a fairly complete sample application of some new types for the
sequoia 2000 project that does exactly this.  that application is available
via anon ftp from postgres.berkeley.edu in directory pub/sequoia/schema/LO,
file arrow_demo.tar.Z.
					mike

TO UNSUBSCRIBE FROM THE POSTGRES MAILING LIST:

	send mail to postgres-request@postgres.Berkeley.EDU
	with a subject line of 'del'.

	if that fails, send mail to post-questions@postgres.Berkeley.EDU,
	explaining the problem and asking for human intervention.
