Hi,
I've recently started on a project whereby we are migrating our INFORMIX 9.2 database to POSTGRES 8.4.2. We are using ESQL (Embedded SQL) in a C language environment running on AIX 6.1. I have a question regarding the following problem.
The INFORMIX code reads as follows, please note that acHostFormat has already been set prior to the call below:
EXEC SQL DECLARE cursName CURSOR FOR
SELECT code, priority INTO :acCode, :acPriority
FROM name_link
WHERE :acHostFormat MATCHES pattern
ORDER BY priority;
Now I am aware that POSTGRES does not have the MATCHES clause but uses the IN clause instead. My POSTGRES version looks like:
EXEC SQL DECLARE cursName CURSOR FOR
SELECT code, priority INTO :acCode, :acPriority
FROM name_link
WHERE :acHostFormat IN pattern
ORDER BY priority;
The problem I'm having is that on compilation I get the following error:
ERROR: syntax error at or near "pattern".
The pattern column in table name_link has entries like:
" I[0-Z] [0-Z] [0-Z] [0-9] "
Any help and advice would be greatly appreciated.
Thank you.
Atif