Re: writing backend extensions using Visual Studio

Tom Lane <[email protected]> Fri, 25 Mar 2005 17:57:07 -0500
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
Greg Landrum <[email protected]> writes:
> After playing around for a while, I managed to get a DLL to build and
> work at least far enough that I can CREATE and call the functions from
> psql.  However, it looks like every argument I pass into the functions
> comes in as null (e.g. PG_ARGISNULL returns true). This clearly is
> less than helpful. :-)

Sounds like MSVC is interpreting the layout of the FunctionCallInfo
struct differently than the MinGW compiler did.  You should probably
look into whether there are "pragma pack" directives lurking in your
program.  ("pragma pack" is evil...)

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings