Migration from INFORMIX to POSTGRESQL - Mailing list pgsql-novice

From Atif Jung
Subject Migration from INFORMIX to POSTGRESQL
Date
Msg-id d1c6b9c51002240356l511c203asa3c7984d98a768c3@mail.gmail.com
Whole thread Raw
Responses Re: Migration from INFORMIX to POSTGRESQL
List pgsql-novice
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



pgsql-novice by date:

Previous
From: Jasen Betts
Date:
Subject: Re: Seeking experiences 'accessing' Microsoft Active Directory credentials from PostgreSQL, in conjunction with the sys admin / IT...
Next
From: Thomas Kellerer
Date:
Subject: Re: Migration from INFORMIX to POSTGRESQL