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

array questions still stands

From: Brett McCormick <brett(at)abraxas(dot)scene(dot)com>
To: pgsql-hackers(at)hub(dot)org
Subject: array questions still stands
Date: 1998-01-25 19:10:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
silly me, it turned out the function had two arguments, and the second
argument just happened to coincide with the type of the array.

When writing a c function to be dynamically loaded and called from
postgres, how do you find out the base element type of an array that
you're accepting as an arugment (getting called with).  array_in/out
seem to get passed this value, wheras my function just gets the
pointer without knowing what the underlying data is.  do I have to
look this up once inside the function?  or, if I know what I'm
getting, can I fudge it?  (i.e. treat them as what I expect them to be
(int4s) without regard for what they actually are).  that doesn't
sound so good to me.

I'd appreciate any help!



pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-01-25 19:11:36
Subject: Re: [HACKERS] Re: Copyright question: GPL patches for non-GPL packages (fwd)
Previous:From: D'Arcy J.M. CainDate: 1998-01-25 18:53:00
Subject: Re: [HACKERS] A small type extension example for the contrib directory (fwd)

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