Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

porting libpq?

2 views
Skip to first unread message

Ariel Manzur

unread,
Jan 5, 2008, 4:30:01 AM1/5/08
to
Hi..

I need to port libpq to a platform that doesn't have a POSIX-like
network API, so I was wondering if the network usage on libpq was
layered somehow? I noticed that it has code for win32, so I guess
there's something, but I didn't see much. Is there any documentation
on how to do this?

Any help will be appreciated.

Thanks..

Ariel.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Bruce Momjian

unread,
Jan 5, 2008, 12:13:23 PM1/5/08
to
Ariel Manzur wrote:
> Hi..
>
> I need to port libpq to a platform that doesn't have a POSIX-like
> network API, so I was wondering if the network usage on libpq was
> layered somehow? I noticed that it has code for win32, so I guess
> there's something, but I didn't see much. Is there any documentation
> on how to do this?

There is no documentation I know of about porting libpq to other
platforms. It normally "just works", with some adjustments for Win32,
as you mentioned. If you are more specific about problems you are
having we can help.

--
Bruce Momjian <br...@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majo...@postgresql.org so that your
message can get through to the mailing list cleanly

Ariel Manzur

unread,
Jan 5, 2008, 3:17:14 PM1/5/08
to
On Jan 5, 2008 3:13 PM, Bruce Momjian <br...@momjian.us> wrote:
> Ariel Manzur wrote:
> > Hi..
> >
> > I need to port libpq to a platform that doesn't have a POSIX-like
> > network API, so I was wondering if the network usage on libpq was
> > layered somehow? I noticed that it has code for win32, so I guess
> > there's something, but I didn't see much. Is there any documentation
> > on how to do this?
>
> There is no documentation I know of about porting libpq to other
> platforms. It normally "just works", with some adjustments for Win32,
> as you mentioned. If you are more specific about problems you are
> having we can help.

No "problems" yet, just looking at what I need to get started.. I
noticed that it includes other libraries like openssl.h and krb5.h, do
any of those make their own calls to the posix network api? Also, is
it supposed to also work with filesystem sockets too?

I've been looking at the code and I see there's calls to send, recv,
socket, etc directly, so I guess I'll have to isolate them myself.. It
seems to include pthreads too, but it looks like it should be easy to
replace.

Thanks for the reply..

Ariel.

Bruce Momjian

unread,
Jan 5, 2008, 3:32:32 PM1/5/08
to
Ariel Manzur wrote:
> On Jan 5, 2008 3:13 PM, Bruce Momjian <br...@momjian.us> wrote:
> > Ariel Manzur wrote:
> > > Hi..
> > >
> > > I need to port libpq to a platform that doesn't have a POSIX-like
> > > network API, so I was wondering if the network usage on libpq was
> > > layered somehow? I noticed that it has code for win32, so I guess
> > > there's something, but I didn't see much. Is there any documentation
> > > on how to do this?
> >
> > There is no documentation I know of about porting libpq to other
> > platforms. It normally "just works", with some adjustments for Win32,
> > as you mentioned. If you are more specific about problems you are
> > having we can help.
>
> No "problems" yet, just looking at what I need to get started.. I
> noticed that it includes other libraries like openssl.h and krb5.h, do
> any of those make their own calls to the posix network api? Also, is
> it supposed to also work with filesystem sockets too?

SSL, Kerberos are all optionally added via configure, so they aren't
required initially. Filesystem sockets is similarly controlled by
HAVE_UNIX_SOCKETS.

> I've been looking at the code and I see there's calls to send, recv,
> socket, etc directly, so I guess I'll have to isolate them myself.. It
> seems to include pthreads too, but it looks like it should be easy to
> replace.

Yes, the networking part is a requirement.

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

0 new messages