The following bug has been logged online: Bug reference: 3943 Logged by: Arnaud Email address: [EMAIL PROTECTED] PostgreSQL version: 8.3.0 Operating system: linux debian etch Description: ecpg doesn't like "inet" operator Details:
This is a sample of my C programm resuming the problem : *************************************************** #include <stdio.h> #include <stdlib.h> int main() { EXEC SQL BEGIN DECLARE SECTION; char *ip_address = "192.168.1.2"; char ip_result[20]; EXEC SQL END DECLARE SECTION; EXEC SQL WHENEVER SQLWARNING SQLPRINT; EXEC SQL CONNECT TO [EMAIL PROTECTED] USER synch IDENTIFIED BY synch; EXEC SQL SELECT text(inet :ip_address) INTO :ip_result; EXEC SQL DISCONNECT; printf("ip_result: %s\n", ip_result); return EXIT_SUCCESS; } *************************************************** And ecpg returns : test_sql.pgc:17: ERROR: syntax error at or near ":ip_address" This error correpond with "EXEC SQL SELECT inet :ip_address;". If I remove inet operator it works well. Of course text() does nothing when I remove inet as postgres doesn't now it is an IP address. ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org