BUG #3943: ecpg doesn't like "inet" operator
| От | Arnaud |
|---|---|
| Тема | BUG #3943: ecpg doesn't like "inet" operator |
| Дата | |
| Msg-id | 200802081842.m18IgrmH017576@wwwmaster.postgresql.org обсуждение |
| Ответы |
Re: BUG #3943: ecpg doesn't like "inet" operator
|
| Список | pgsql-bugs |
The following bug has been logged online:
Bug reference: 3943
Logged by: Arnaud
Email address: arnaud.desmier@free.fr
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 synch@localhost 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.
В списке pgsql-bugs по дате отправления: