Error: column "host" does not exist - Mailing list pgsql-general

From Mayuresh Nirhali
Subject Error: column "host" does not exist
Date
Msg-id 4965AB7F.6000303@Sun.COM
Whole thread Raw
Responses Re: Error: column "host" does not exist
Re: Error: column "host" does not exist
List pgsql-general
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.

I dont understand why I see the "column does not exist" error; any idea ?

cheers
Mayuresh


pgsql-general by date:

Previous
From: "SATYAJIT TRIPATHI"
Date:
Subject: Need help! To build geos-3.0.x lib using Sun Studio 12 compiler [conflict in file ConvexHull.cpp]
Next
From: "A. Kretschmer"
Date:
Subject: Re: Fail of a return query from plpgsql function for a specific table