Re: Custom C function - is palloc broken?

From: "Dan \"Heron\" Myers" <heron(at)xnapid(dot)com>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: Custom C function - is palloc broken?
Date: 2008-05-06 02:45:05
Message-ID: 481FC631.9070509@xnapid.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Craig Ringer wrote:
> And in the server log files (PG_INSTALL_DIR\data\pg_log) ?

The log files contained no indication of an error, not even an "oops,
the server crashed" message.

> I'd be interested in confirmation that you're able to get your code
> working when you build it with VC++ .

I did get the examples.c file to work with VC++ 2008 Professional, so I
should be able to get the other functions I need to work.

Tom Lane wrote:
> You need to
> get over this concept of "Postgres is broken" and try to identify a
> specific reason why your DLL builds are not working.

I don't think I ever said Postgres was broken. I said Postgres was
crashing. I expressed doubt that Postgres' win32 binary was built with
MSVC++... mostly because the website still says it was built with mingw.
In any case, I was mostly confused that Postgres would build their
stuff with MSVC++ but not provide #ifndef WIN32 (or whatever) blocks
around the stuff that can be ignored in windows.

But that's all essentially irrelevant. In the future I will keep my
speculation to myself lest I be accused of calling Postgres "broken".

> I'm starting to wonder just how broken the tools you two are using
> must be ...

If by "broken" you mean "a Windows-only compiler excluding unix-only
headers from its include directories", then I guess Visual Studio is
completely broken. If by "broken" you mean "MinGW apparently can't be
used to compile .dlls for use with Postgres", then that is also correct.
I don't think either set of tools is actually broken, though.

In any case, I did get the examples compiling with Visual C++ 2008
Professional, and the resulting .dll does work in Postgres. If I run
into any other problems I'll be back.

Thanks,
Dan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2008-05-06 03:18:42 Re: Custom C function - is palloc broken?
Previous Message Tom Lane 2008-05-06 02:32:11 Re: Custom C function - is palloc broken?