Thread: FW: Can't find postgres.h or fmgr.h

FW: Can't find postgres.h or fmgr.h

From
"Mark Miller"
Date:
I found a thread here
http://archives.postgresql.org/pgsql-hackers-win32/2005-03/msg00149.php
which indicates that the headers aren't even installed in the windows build.
How can I install the headers so I can use them. I'm not finding anything in
the docs.

By the way, I am on WinXP using Microsoft Visual C++. We are a microsoft
shop and I am researching migrating from Sql Server to postgresSql, but I
need to add some functionality to support features we need in order for the
migration to work.

Regards,
Mark

-----Original Message-----
From: Joshua D. Drake [mailto:jd@commandprompt.com]
Sent: Thursday, April 21, 2005 9:41 AM
To: Andrew Dunstan
Cc: mark@maxpreps.com; pgsql-hackers-win32@postgresql.org
Subject: Re: [pgsql-hackers-win32] Can't find postgres.h or fmgr.h

Andrew Dunstan wrote:
>
>
> Mark Miller wrote:
>
>> I have installed the binary of version 8.0.2 using the installer, and
>> I requested all the developer options from the install but I can't
>> find postgres.h or fmgr.h I need to write custom functions.
>>
>> I am new to postgres and to C so forgive my ingorance. And if I have
>> posted to the wrong list please let me know.
>>
>
>
> Talk about jumping in at the deep end ...

Some people think it is the only way to learn to swim :)


>
> cheers
>
> andrew
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org


--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedication Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


Re: FW: Can't find postgres.h or fmgr.h

From
Greg Landrum
Date:
On 4/21/05, Mark Miller <mark@maxpreps.com> wrote:
> I found a thread here
> http://archives.postgresql.org/pgsql-hackers-win32/2005-03/msg00149.php
> which indicates that the headers aren't even installed in the windows build.
> How can I install the headers so I can use them. I'm not finding anything in
> the docs.

That thread actually contains most (all?) of the information you need
to get things installed.  You'll need to do a source distribution and
then build the backend libraries using mingw (read through the
thread).

> By the way, I am on WinXP using Microsoft Visual C++. We are a microsoft
> shop and I am researching migrating from Sql Server to postgresSql, but I
> need to add some functionality to support features we need in order for the
> migration to work.

I didn't spend a lot of time on it, but I wasn't able to get backend
functionality (functions running in the server) to work using MSVC++,
I had to use g++ under mingw to do these builds.

-greg

Re: FW: Can't find postgres.h or fmgr.h

From
Andrew Dunstan
Date:

Mark Miller wrote:

>I found a thread here
>http://archives.postgresql.org/pgsql-hackers-win32/2005-03/msg00149.php
>which indicates that the headers aren't even installed in the windows build.
>How can I install the headers so I can use them. I'm not finding anything in
>the docs.
>
>By the way, I am on WinXP using Microsoft Visual C++. We are a microsoft
>shop and I am researching migrating from Sql Server to postgresSql, but I
>need to add some functionality to support features we need in order for the
>migration to work.
>
>
>
>
>

To the best of my knowledge you must use the MinGW/MSys toolset to make
your own serverside functions etc. I have not heard of anyone doing this
successfully with the Microsoft toolset. Note that you only need these
tools to build addons, not to run them.

cheers

andrew

Re: FW: Can't find postgres.h or fmgr.h

From
John A Meinel
Date:
Mark Miller wrote:

>I found a thread here
>http://archives.postgresql.org/pgsql-hackers-win32/2005-03/msg00149.php
>which indicates that the headers aren't even installed in the windows build.
>How can I install the headers so I can use them. I'm not finding anything in
>the docs.
>
>By the way, I am on WinXP using Microsoft Visual C++. We are a microsoft
>shop and I am researching migrating from Sql Server to postgresSql, but I
>need to add some functionality to support features we need in order for the
>migration to work.
>
>Regards,
>Mark
>
Well, you need to get the source distribution. One key point to make
sure that your environment is corret to develop backend functions is
that you are able to compile the postgres source.

I believe Visual C++ is not supported for compiling back-end programs.
Clients, etc are fine, but the backend is only supported on MinGW.

What is the specific functionality that you need that cannot be done in
a regular function? In say plpgsql, or pl/perl or pl/python?
Those are probably easier to maintain in the long run.

John
=:->


Attachment

Re: Can't find postgres.h or fmgr.h

From
"Mark Miller"
Date:
Ok, I'll check that out. But what about installing the postgresSql headers
on my machine? In the install directory there is no include/server directory
which means I'm missing "postgres.h" and "fmgr.h". How can I install these
on my system.

Regards,
Mark

-----Original Message-----
From: Andrew Dunstan [mailto:andrew@dunslane.net]
Sent: Thursday, April 21, 2005 10:19 AM
To: mark@maxpreps.com
Cc: pgsql-hackers-win32@postgresql.org
Subject: Re: FW: [pgsql-hackers-win32] Can't find postgres.h or fmgr.h



Mark Miller wrote:

>I found a thread here
>http://archives.postgresql.org/pgsql-hackers-win32/2005-03/msg00149.php
>which indicates that the headers aren't even installed in the windows
build.
>How can I install the headers so I can use them. I'm not finding anything
in
>the docs.
>
>By the way, I am on WinXP using Microsoft Visual C++. We are a microsoft
>shop and I am researching migrating from Sql Server to postgresSql, but I
>need to add some functionality to support features we need in order for the
>migration to work.
>
>
>
>
>

To the best of my knowledge you must use the MinGW/MSys toolset to make
your own serverside functions etc. I have not heard of anyone doing this
successfully with the Microsoft toolset. Note that you only need these
tools to build addons, not to run them.

cheers

andrew


Re: Can't find postgres.h or fmgr.h

From
"Mark Miller"
Date:
Thanks, I'll try it.

Mark

-----Original Message-----
From: Greg Landrum [mailto:greg.landrum@gmail.com]
Sent: Thursday, April 21, 2005 10:19 AM
To: pgsql-hackers-win32@postgresql.org; mark@maxpreps.com
Subject: Re: FW: [pgsql-hackers-win32] Can't find postgres.h or fmgr.h

On 4/21/05, Mark Miller <mark@maxpreps.com> wrote:
> I found a thread here
> http://archives.postgresql.org/pgsql-hackers-win32/2005-03/msg00149.php
> which indicates that the headers aren't even installed in the windows
build.
> How can I install the headers so I can use them. I'm not finding anything
in
> the docs.

That thread actually contains most (all?) of the information you need
to get things installed.  You'll need to do a source distribution and
then build the backend libraries using mingw (read through the
thread).

> By the way, I am on WinXP using Microsoft Visual C++. We are a microsoft
> shop and I am researching migrating from Sql Server to postgresSql, but I
> need to add some functionality to support features we need in order for
the
> migration to work.

I didn't spend a lot of time on it, but I wasn't able to get backend
functionality (functions running in the server) to work using MSVC++,
I had to use g++ under mingw to do these builds.

-greg


Re: FW: Can't find postgres.h or fmgr.h

From
"Mark Miller"
Date:
We use GUIDs (UUID) and converting them to a CHAR(36) isn't going to be a
good idea. I've seen at least 2 UUID projects on Gborg and I'd like to see
if I can get them to compile for Windows or if I can just write a wrapper
for the Windows GUID functions.

Mark

-----Original Message-----
From: John A Meinel [mailto:john@arbash-meinel.com]
Sent: Thursday, April 21, 2005 10:20 AM
To: mark@maxpreps.com
Cc: pgsql-hackers-win32@postgresql.org
Subject: Re: FW: [pgsql-hackers-win32] Can't find postgres.h or fmgr.h

Mark Miller wrote:

>I found a thread here
>http://archives.postgresql.org/pgsql-hackers-win32/2005-03/msg00149.php
>which indicates that the headers aren't even installed in the windows
build.
>How can I install the headers so I can use them. I'm not finding anything
in
>the docs.
>
>By the way, I am on WinXP using Microsoft Visual C++. We are a microsoft
>shop and I am researching migrating from Sql Server to postgresSql, but I
>need to add some functionality to support features we need in order for the
>migration to work.
>
>Regards,
>Mark
>
Well, you need to get the source distribution. One key point to make
sure that your environment is corret to develop backend functions is
that you are able to compile the postgres source.

I believe Visual C++ is not supported for compiling back-end programs.
Clients, etc are fine, but the backend is only supported on MinGW.

What is the specific functionality that you need that cannot be done in
a regular function? In say plpgsql, or pl/perl or pl/python?
Those are probably easier to maintain in the long run.

John
=:->



Re: FW: Can't find postgres.h or fmgr.h

From
"Mark Miller"
Date:
Excuse me for being a pest, but I can't seem to find how to compile the
source for windows. I've downloaded MinGW but where can I find how to
compile the source and install it on windows? If I should be posting this
question to the novice list let me know.

Mark

-----Original Message-----
From: John A Meinel [mailto:john@arbash-meinel.com]
Sent: Thursday, April 21, 2005 10:20 AM
To: mark@maxpreps.com
Cc: pgsql-hackers-win32@postgresql.org
Subject: Re: FW: [pgsql-hackers-win32] Can't find postgres.h or fmgr.h

Mark Miller wrote:

>I found a thread here
>http://archives.postgresql.org/pgsql-hackers-win32/2005-03/msg00149.php
>which indicates that the headers aren't even installed in the windows
build.
>How can I install the headers so I can use them. I'm not finding anything
in
>the docs.
>
>By the way, I am on WinXP using Microsoft Visual C++. We are a microsoft
>shop and I am researching migrating from Sql Server to postgresSql, but I
>need to add some functionality to support features we need in order for the
>migration to work.
>
>Regards,
>Mark
>
Well, you need to get the source distribution. One key point to make
sure that your environment is corret to develop backend functions is
that you are able to compile the postgres source.

I believe Visual C++ is not supported for compiling back-end programs.
Clients, etc are fine, but the backend is only supported on MinGW.

What is the specific functionality that you need that cannot be done in
a regular function? In say plpgsql, or pl/perl or pl/python?
Those are probably easier to maintain in the long run.

John
=:->



Re: FW: Can't find postgres.h or fmgr.h

From
"Mark Miller"
Date:
My bad, I don't have the source, but I do have the distribution w/o the
installer. What do I need to do to intall the neccary headers and libraries?


Re: FW: Can't find postgres.h or fmgr.h

From
"Claudio Natoli"
Date:
Hello Mark,

> Excuse me for being a pest, but I can't seem to find how to compile the
> source for windows. I've downloaded MinGW but where can I find how to
> compile the source and install it on windows?

This should get you going: http://momjian.postgresql.org/main/writings/pgsql/win32.html

For 8.0.2 source instead, try: ftp://ftp.postgresql.org/pub/source/v8.0.2/postgresql-8.0.2.tar.bz2, which you will
decompressusing bunzip2 and tar (which will be in your MingW installation) 

Cheers,
Claudio


Re: FW: Can't find postgres.h or fmgr.h

From
Bruce Momjian
Date:
Claudio Natoli wrote:
>
> Hello Mark,
>
> > Excuse me for being a pest, but I can't seem to find how to compile the
> > source for windows. I've downloaded MinGW but where can I find how to
> > compile the source and install it on windows?
>
> This should get you going: http://momjian.postgresql.org/main/writings/pgsql/win32.html
>
> For 8.0.2 source instead, try: ftp://ftp.postgresql.org/pub/source/v8.0.2/postgresql-8.0.2.tar.bz2, which you will
decompressusing bunzip2 and tar (which will be in your MingW installation) 

Your tarball has a doc/FAQ_MINGW file.  The instructions are there, and
also on our web site under Documentation.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073