[pgsql-jp 5574] Re: Is array_iterator.c work? (fwd)

From: Jun Kuwamura <juk(at)rccm(dot)co(dot)jp>
To: pgsql-general(at)postgresql(dot)org, delmendo(at)cymitar(dot)net
Cc: pgsql-hack(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: [pgsql-jp 5574] Re: Is array_iterator.c work? (fwd)
Date: 1998-10-08 08:51:38
Message-ID: Pine.LNX.3.96LJ1.1b7.981008174222.31034C-100000@earth.astea.rccm.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces


An article in the pgsql-interfaces:

> From: Dirk Elmendorf <delmendo(at)cymitar(dot)net>
> To: pgsql-interfaces(at)postgresql(dot)org, Massimo Dal Zotto<dz(at)cs(dot)unitn(dot)it>
> Subject: fmgr_info
> Date: Thu, 18 Jun 1998 16:48:16 -0500 (CDT)
>
> I've finally upgraded from 6.1 to 6.3.2. And I went to recompile some of
> the custom functions I've built for Postgres-
> The problem I'm having is the declaration for fmgr_info has
> changed completely and I'm not sure how to make my code 6.3.2 compliant.
> Most of it is based directly off of the array iterator code provided in
> the contrib directory. I check this code out but I get the same error:
>
> array_iterator.c: In function `array_iterator':
> array_iterator.c:74: warning: passing arg 2 of `fmgr_info' from
> incompatible pointer type
> array_iterator.c:74: too many arguments to function `fmgr_info'
>
> Is there a 6.3.2 compliant version of array iterator available?

I came accross the same problem. I looked inside the code and found
that the following patch will be the help.

--- postgresql-6.3.2/contrib/array/array_iterator.c.orig Tue Apr 21 10:58:02 1998
+++ postgresql-6.3.2/contrib/array/array_iterator.c Thu Oct 8 17:33:53 1998
@@ -34,6 +34,7 @@
bool typbyval;
int typlen;
func_ptr proc_fn;
+ FmgrInfo fmgrinfo;
int pronargs;
int nitems,
i,
@@ -71,8 +72,9 @@

/* Lookup the function entry point */
proc_fn = (func_ptr) NULL;
- fmgr_info(proc, &pronargs); /* (proc, &proc_fn, &pronargs); */
- if ((proc_fn == NULL) || (pronargs != 2))
+ fmgr_info(proc, &fmgrinfo); /* (proc, &proc_fn, &pronargs); */
+ proc_fn = fmgrinfo.fn_addr;
+ if (( proc_fn == NULL) || (fmgrinfo.fn_nargs != 2))
{
elog(ERROR, "array_iterator: fmgr_info lookup failed for oid %d", proc);
return (0);
--
Jun Kuwamura
rC Cm Research Center of Computational Mechanics, Inc.
^ E-Mail: juk(at)rccm(dot)co(dot)jp
~

Browse pgsql-general by date

  From Date Subject
Next Message Memphisto 1998-10-08 13:14:06 No clue for embedded SQL
Previous Message Jose' Soares 1998-10-08 07:46:55 Re: [GENERAL] Row Nums

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jackson, DeJuan 1998-10-08 16:29:23 RE: [HACKERS] Re: [COMMITTERS] 'pgsql/doc/src/sgml protocol.sgml'
Previous Message Peter T Mount 1998-10-07 21:31:04 New JDBC Driver Patch