On Sun, Apr 22, 2007 at 06:52:33PM -0400, Brad Buran wrote:
> I'm trying to learn how to write custom extensions to postgres so wrote a
> basic C function to see how it works.  However, I keep getting the following
> error "Missing magic block" when I try to add the function to the database.
> According to the documentation in the manual, all I need to do is add the
> following: 

<snip>

> And the sql statement I am using is:
> 
> CREATE FUNCTION add_one(IN int)
>       RETURNS int
>       AS 'add_one'
>       LANGUAGE C;

Shouldn't the name of the library appear in there somewhere?

Also, you may need to exit and restart psql to get a new session to
make sure the new version of the library is loaded.

Have a nice day,
-- 
Martijn van Oosterhout   <[EMAIL PROTECTED]>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to 
> litigate.

Attachment: signature.asc
Description: Digital signature

Reply via email to