Skip site navigation (1) Skip section navigation (2)

Re: compiling C Funktion for PostgreSQL

From: Marcin Giedz <giedz(at)arise(dot)pl>
To: Jürgen Ulrich <juergen(dot)ulrich(at)etourism-austria(dot)at>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: compiling C Funktion for PostgreSQL
Date: 2007-07-17 12:20:00
Message-ID: 469CB3F0.3070703@arise.pl (view raw or flat)
Thread:
Lists: pgsql-admin
Jürgen Ulrich wrote:
>
> Hello,
>
Hi,

I hope this is what you're looking for:

add to your C code:

#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
#endif

Regards,
Marcin
>
> I have a problem with the postgreSQL Source Code when I compile the 
> fuzzystrmatch.c. I want to try to replace all german umlauts for the 
> soundex algorithm. But when I want to compile the C Code, I get an 
> error on the following line in the fuzzystrmatch.c:
>
> PG_MODULE_MAGIC;
>
> And here is the error I get:
>
> |In function 'Pg_magic_func': 'PG_VERSION_NUM' undeclared (first use 
> in function)|
>
> | |
>
> |The PG_VERSION_NUM is defined in the fmgr.h of the PostgreSQL Source 
> Code:|
>
> | |
>
> |/* Definition of the magic block structure */ |
> |typedef struct |
> |{ |
> | int len; /* sizeof(this struct) */ |
> | int version; /* PostgreSQL major version */ |
> | int funcmaxargs; /* FUNC_MAX_ARGS */ |
> | int indexmaxkeys; /* INDEX_MAX_KEYS */ |
> | int namedatalen; /* NAMEDATALEN */ |
> |} Pg_magic_struct; |
>
>
> |/* The actual data block contents */ |
> |#define PG_MODULE_MAGIC_DATA \ |
> |{ |
> | sizeof(Pg_magic_struct), |
> | PG_VERSION_NUM / 100, |
> | FUNC_MAX_ARGS, |
> | INDEX_MAX_KEYS, |
> | NAMEDATALEN |
> |}|
>
> | |
>
> |Can anyone help me to figure out this problem?|
>
> | |
>
> |Thanks in advance|
>
> |Jürgen Ulrich|
>


-- 
ARISE M.Giedz, T.Żebruń sp.j.
http: www.arise.pl
mail: giedz(at)arise(dot)pl
tel: +48 502 537 157



In response to

pgsql-admin by date

Next:From: Jayakumar_MukundarajuDate: 2007-07-17 13:16:26
Subject: Re: PgAgent Job Scheduling-Backup
Previous:From: Jayakumar_MukundarajuDate: 2007-07-17 12:18:33
Subject: Re: Job Scheduling-snap shoot

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group