Re: Error: column "host" does not exist

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Error: column "host" does not exist
Дата
Msg-id 20090108075921.GC15370@a-kretschmer.de
обсуждение исходный текст
Ответ на Error: column "host" does not exist  (Mayuresh Nirhali <Mayuresh.Nirhali@Sun.COM>)
Ответы Re: Error: column "host" does not exist
Список pgsql-general
In response to Mayuresh Nirhali :
> Hello,
>
> I am working with 8.1.4 pgsql as my database backend. I have a function
> written in plpgsql language, that queries a particular table as below,
>
> select host from table_host where ip_address = ip_array[i] and port =
> port_array[i];
>
> The query is running in a for loop. I see ip_array and port_array
> getting populated with correct values during the execution.
> The error I see is,
>
> ERROR:  column "host" does not exist
> CONTEXT:  SQL statement "SELECT host"
>        PL/pgSQL function "sp_get_ip_data" line 286 at raise
>
> throu psql, I can select the table_host fine.
> column "host" is a primary key here.

Not sure, but host is a reserved word, see:
http://www.postgresql.org/docs/8.1/interactive/sql-keywords-appendix.html


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

В списке pgsql-general по дате отправления:

Предыдущее
От: Reg Me Please
Дата:
Сообщение: Re: Error: column "host" does not exist
Следующее
От: Mayuresh Nirhali
Дата:
Сообщение: Re: Error: column "host" does not exist