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

Re: BUG #1164: Informix compatibility ecpg

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: John Smith <john(at)roundel(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1164: Informix compatibility ecpg
Date: 2004-06-22 06:42:44
Message-ID: 20040622064244.GA5444@1 (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Mon, Jun 14, 2004 at 08:08:37PM -0300, PostgreSQL Bugs List wrote:
> 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. 

I'm not sure I understand you correctly. You mean you cannot use
something like this:

create table test (integer integer);

in ecpg?

Well that one works for me.

> 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. 

Virtually no chance here. Changing this would mean some major work on
the lexer to not break SQL compatibility in non-compatibility mode.

> 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. 

This seems to be a bug. Could you please send me a test case? I have no
Informix myself so I need to know how Informix reacts to this test case.

Also, you know that you hve to specify "-r no_indicator" for this to
work I assume.

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

Unfortunately this is so very true.

Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

In response to

pgsql-bugs by date

Next:From: PostgreSQL Bugs ListDate: 2004-06-22 09:29:29
Subject: BUG #1176: PHP connection
Previous:From: Tom LaneDate: 2004-06-22 02:14:53
Subject: Re: BUG #1175: insert rule action with defaults

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