Skip site navigation (1) Skip section navigation (2)

Migration from INFORMIX to POSTGRESQL

From: Atif Jung <atifjung(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Migration from INFORMIX to POSTGRESQL
Date: 2010-02-24 11:56:59
Message-ID: d1c6b9c51002240356l511c203asa3c7984d98a768c3@mail.gmail.com (view raw or flat)
Thread:
Lists: 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

Responses

pgsql-novice by date

Next:From: Thomas KellererDate: 2010-02-24 12:43:32
Subject: Re: Migration from INFORMIX to POSTGRESQL
Previous:From: Jasen BettsDate: 2010-02-24 10:45:07
Subject: Re: Seeking experiences 'accessing' Microsoft Active Directory credentials from PostgreSQL, in conjunction with the sys admin / IT...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group