Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 81F029FB6C9 for ; Tue, 17 Jul 2007 04:34:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 36194-07 for ; Tue, 17 Jul 2007 04:34:12 -0300 (ADT) X-Greylist: delayed 00:19:58.424739 by SQLgrey-1.7.5 Received: from smtp.uibk.ac.at (lmr1.uibk.ac.at [138.232.1.142]) by postgresql.org (Postfix) with ESMTP id B38789FB73B for ; Tue, 17 Jul 2007 04:34:14 -0300 (ADT) Received: from nilpferd (ecca38.uibk.ac.at [138.232.185.238] juergen.ulrich@etourism-austria.at) by smtp.uibk.ac.at (8.13.8/8.13.8/F1) with ESMTP id l6H7ECX4015357 for ; Tue, 17 Jul 2007 09:14:12 +0200 Message-Id: <200707170714.l6H7ECX4015357@smtp.uibk.ac.at> From: =?iso-8859-1?Q?J=FCrgen_Ulrich?= To: Subject: compiling C Funktion for PostgreSQL Date: Tue, 17 Jul 2007 09:12:57 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0000_01C7C852.AAFF73D0" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcfIQebUgvJuBHMTSYyEeyHiJpWB7w== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Scanned-By: MIMEDefang 2.61 at uibk.ac.at on 138.232.1.140 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.498 tagged_above=0 required=5 tests=BAYES_50=0.001, DRUGS_STOCK_MIMEOLE=3.496, HTML_MESSAGE=0.001 X-Spam-Level: *** X-Archive-Number: 200707/170 X-Sequence-Number: 26151 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C7C852.AAFF73D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, 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: =20 PG_MODULE_MAGIC; =20 =20 And here is the error I get: =20 In function 'Pg_magic_func': 'PG_VERSION_NUM' undeclared (first use in function) =20 The PG_VERSION_NUM is defined in the fmgr.h of the PostgreSQL Source = Code: =20 /* Definition of the magic block structure */=20 typedef struct=20 {=20 int len; /* sizeof(this struct) */=20 int version; /* PostgreSQL major version */=20 int funcmaxargs; /* FUNC_MAX_ARGS */=20 int indexmaxkeys; /* INDEX_MAX_KEYS */=20 int namedatalen; /* NAMEDATALEN */=20 } Pg_magic_struct;=20 /* The actual data block contents */=20 #define PG_MODULE_MAGIC_DATA \=20 { =20 sizeof(Pg_magic_struct), =20 PG_VERSION_NUM / 100, =20 FUNC_MAX_ARGS, =20 INDEX_MAX_KEYS, =20 NAMEDATALEN =20 } =20 Can anyone help me to figure out this problem? =20 Thanks in advance J=FCrgen Ulrich ------=_NextPart_000_0000_01C7C852.AAFF73D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hello,

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': 'P= G_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;      &n= bsp;     /* sizeof(this struct) *= /
    int       = ;     version;     &nbs= p;  /* PostgreSQL major version */
    int       = ;     funcmaxargs;    /*&nbs= p;FUNC_MAX_ARGS */
    int       = ;     indexmaxkeys;    /*&nb= sp;INDEX_MAX_KEYS */
    int       = ;     namedatalen;    /*&nbs= p;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=FCrgen Ulrich

------=_NextPart_000_0000_01C7C852.AAFF73D0--