Re: BUG #3943: ecpg doesn't like "inet" operator - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3943: ecpg doesn't like "inet" operator
Date
Msg-id 6993.1202506967@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3943: ecpg doesn't like "inet" operator  ("Arnaud" <arnaud.desmier@free.fr>)
List pgsql-bugs
"Arnaud" <arnaud.desmier@free.fr> writes:
>   EXEC SQL SELECT text(inet :ip_address) INTO :ip_result;

This is incorrect, and always has been, but 8.3 is more picky about it.
Use a cast instead, eg

>   EXEC SQL SELECT text(:ip_address :: inet) INTO :ip_result;

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Dan Hrabarchuk"
Date:
Subject: BUG #3944: Unable to create a database using SQL_ASCII encoding
Next
From: Tom Lane
Date:
Subject: Re: BUG #3944: Unable to create a database using SQL_ASCII encoding