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

BUG #1164: Informix compatibility ecpg

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1164: Informix compatibility ecpg
Date: 2004-06-14 23:08:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      1164
Logged by:          John Smith

Email address:      john(at)roundel(dot)net

PostgreSQL version: 7.4

Operating system:   Linux 2.4 [Fedora core 1]

Description:        Informix compatibility ecpg


O/S: Linux 2.4 [Fedora core 1]
PostgreSQL 7.4.2
command line:
ecpg -t prog.pgc -C INFORMIX  -o prog.c

I'm Converting a project from Informix to PostgreSQL, and intended to make 
use of Informix compatibility mode to speed the process. I understand that 
some core differences (error handling for example) cannot easily be 

I've found some incompatibles though that seem to me could be catered for:

In Informix ESQL/C, columns can be defined using the same string that's used 
to describe the field when describing the table. Hence "integer" will work 
in esql, but not in ecpg. 

Informix treats the single and double quote as synonyms in SELECT 
statements. Thus  
... WHERE countries.country_code = "UK"
is valid in Informix, but in PostgreSQL needs to be re-written as
... WHERE countries.country_code = 'UK'.
The error message for this is not obvious to a programmer brought up on 
informix, as it refers to a column called "UK" that does not exist. 

A SELECT from a NULL field in Informix is trapped using the Informix call 
"risnull()". Although this function is provided with ecpg, null values were 
not successfully trapped, and I had to resort to using the PostgreSQL 
standard indicator variables. I can supply more details on this one on 
request, as it's C code that probably doesn't belong here. 

Generally though, I've been unable to find any documentation on the 
Informix-compatibility mode. 



pgsql-bugs by date

Next:From: Bruce MomjianDate: 2004-06-15 00:51:02
Subject: Re: PostgreSQL does not have native spinlock support on this
Previous:From: Tom LaneDate: 2004-06-14 16:48:36
Subject: Re: \w doesn't match non-ASCII letters

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