Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 9B55D9FBB99 for ; Tue, 17 Jul 2007 10:25:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 27266-08 for ; Tue, 17 Jul 2007 10:25:41 -0300 (ADT) X-Greylist: delayed 01:05:34.59182 by SQLgrey-1.7.5 Received: from mail.tron.net.pl (afx188.internetdsl.tpnet.pl [83.16.153.188]) by postgresql.org (Postfix) with ESMTP id D453B9FB9BF for ; Tue, 17 Jul 2007 10:25:48 -0300 (ADT) Received: from fgl50.internetdsl.tpnet.pl ([83.13.167.50]:41462 helo=[192.168.89.101]) by mail.tron.net.pl with esmtpa (Exim 4.63) (envelope-from ) id 1IAlz6-00015s-Dh; Tue, 17 Jul 2007 14:17:02 +0200 Message-ID: <469CB3F0.3070703@arise.pl> Date: Tue, 17 Jul 2007 14:20:00 +0200 From: Marcin Giedz User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: =?UTF-8?B?SsO8cmdlbiBVbHJpY2g=?= CC: pgsql-admin@postgresql.org References: <200707170714.l6H7ECX4015357@smtp.uibk.ac.at> In-Reply-To: <200707170714.l6H7ECX4015357@smtp.uibk.ac.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 83.13.167.50 X-SA-Exim-Mail-From: giedz@arise.pl Subject: Re: compiling C Funktion for PostgreSQL X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000) X-SA-Exim-Scanned: Yes (on mail.tron.net.pl) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200707/173 X-Sequence-Number: 26154 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