Обсуждение: Re: How to use gethostbyname()

Поиск
Список
Период
Сортировка

Re: How to use gethostbyname()

От
Tom Lane
Дата:
<phillip@formstar.com> writes:
> I am running Postgres 7.0.0 and compiled Postgres myself. However, I
> did not add any parameters to 'configure' script.

Nonetheless, gethostbyname() is *not* a function provided in the
standard distribution.    You must have gotten it from someplace else.
You'll need to find the author and ask him/her how it's supposed to
work.

            regards, tom lane

Re: How to use gethostbyname()

От
Дата:
I am running Postgres 7.0.0 and compiled Postgres myself. However, I did not add
any parameters to 'configure' script.

> <phillip@formstar.com> writes:
> > On Fri, 16 Feb 2001, Tom Lane wrote:
> >> <phillip@formstar.com> writes:
> > In psql, gethostbyname() is defined as taking a text parameter and return an
> > inet type value or reference.
> >>
> >> Huh?  There's no such function in the standard Postgres distribution.
>
> > If you do a '\df' at prompt, you will be able to see I am not lying.
>
> regression=# \df
> ...
>  text                     | format_type         | oid, integer
>  integer                  | get_bit             | bytea, integer
>  integer                  | get_byte            | bytea, integer
>  name                     | getdatabaseencoding |
>  name                     | getpgusername       |
>  integer                  | hashbpchar          | character
>  integer                  | hashchar            | "char"
>  integer                  | hashfloat4          | real
> ...
>
> It's not in 7.1, nor 7.0.  Where did you get it from?  Which Postgres
> version are you running, anyway?
>
>             regards, tom lane
>

Phillip Pan
-----------