Re: How to use gethostbyname() - Mailing list pgsql-general

From Bruce Momjian
Subject Re: How to use gethostbyname()
Date
Msg-id 200102162247.RAA11720@candle.pha.pa.us
Whole thread Raw
In response to Re: How to use gethostbyname()  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
> phillip@formstar.com writes:
>
> > In psql, gethostbyname() is defined as taking a text parameter and return an
> > inet type value or reference.
>
> I don't see a function gethostbyname() in my copy.  Where did you get it
> from and what is its source code?

Don't tell me it is one of those "grab from libc" tricks.

   CREATE FUNCTION getpid () returns int4 as '/lib/libc.so.6' LANGUAGE 'C';
   SELECT getpid();

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: Alfonso Peniche
Date:
Subject: aliases for temp tables.... again
Next
From: Feite Brekeveld
Date:
Subject: how to return more than 1 arg with a function ?