pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marcin Giedz <giedz@arise.pl>
To: Jürgen Ulrich <juergen.ulrich@etourism-austria.at>
Cc: pgsql-admin@postgresql.org
Subject: Re: compiling C Funktion for PostgreSQL
Date: Tue, 17 Jul 2007 14:20:00 +0200
Message-ID: <469CB3F0.3070703@arise.pl> (raw)
In-Reply-To: <200707170714.l6H7ECX4015357@smtp.uibk.ac.at>
References: <200707170714.l6H7ECX4015357@smtp.uibk.ac.at>

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@arise.pl
tel: +48 502 537 157





view thread (3+ messages)  latest in thread

Message-ID: <469CB3F0.3070703@arise.pl>
Permalink:  ../469CB3F0.3070703@arise.pl/
Also on:    postgresql.org/message-id/469CB3F0.3070703@arise.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: giedz@arise.pl, juergen.ulrich@etourism-austria.at
  Subject: Re: compiling C Funktion for PostgreSQL
  In-Reply-To: <469CB3F0.3070703@arise.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox