agora inbox for pgsql-interfaces@postgresql.org  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: Mark Richardson <markmapo@yahoo.com>
Cc: pgsql-interfaces@postgresql.org, Satoshi Nagayasu <satoshi.nagayasu@gmail.com>
Subject: Re: ECPG Documentation Improvement
Date: Fri, 18 Jun 2010 11:40:08 +0200
Message-ID: <20100618094008.GA17483@feivel.credativ.lan> (raw)
In-Reply-To: <695459.74507.qm@web53308.mail.re2.yahoo.com>
References: <4C19E5B9.3040002@gmail.com>
	<695459.74507.qm@web53308.mail.re2.yahoo.com>

On Thu, Jun 17, 2010 at 12:27:33PM -0700, Mark Richardson wrote:
> Here's some info that I found...

Just a few questions to make sure I understand your correctly.

> "INCLUDE SQLCA" "INCLUDE sqlca"

So it's just the case of the name? We could lowercase the name in ecpg or
simply install a link SQLCA.h->sqlca.h. So there is no need to change that
anymore. Thoughts?

> "SQLCA" "struct sqlca_t"

struct sqlca_t is defined in sqlca.h but I cannot see a reason why it is used
in client code. sqlca.h also defines sqlca, so it might be a case problem
again. Does it still work if you replace "SQLCA" by "sqlca"?

> "CS_BIT" "bool"
> "CS_CHAR" "char"
> "CS_INT" "int"
> "CS_TINYINT" "short"
> "CS_SMALLINT" "short"
> "CS_REAL" "float"
> "CS_FLOAT" "double"
> "CS_LONG_LONG" "long long"
> "CS_LONG" "int"
> "CS_BINARY" "char"
> "CS_TEXT" "char"
> "ISOLATION LEVEL 0" "ISOLATION LEVEL READ COMMITTED"
> "ISOLATION LEVEL 1" "ISOLATION LEVEL READ COMMITTED"
> "ISOLATION LEVEL 2" "ISOLATION LEVEL SERIALIZABLE"

We could add this in a compatibility level.

> "CHAINED OFF" "CHAINED TO OFF"
> "CHAINED ON" "CHAINED TO ON"

These maybe too.

> I also looked up the boolean type for ecpg, the problem is in postgres 8.0.1 (maybe later)
> postgresql/src/interfaces/ecpglib/execute.c line 775 (case ECPGt_bool)
> the line was
> sprintf(mallocedval, "'%c'", (*((char *) var->value)) ? 't' : 'f');
> changed it to
> sprintf(mallocedval, "'%c'", (*((char *) var->value)) ? '1' : '0');

It still uses 't' and 'f', so that's crying for the compatibility level too.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ 179140304, AIM/Yahoo/Skype michaelmeskes, Jabber meskes@jabber.org
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



view thread (20+ messages)  latest in thread

Message-ID: <20100618094008.GA17483@feivel.credativ.lan>
Permalink:  ../20100618094008.GA17483@feivel.credativ.lan/
Also on:    postgresql.org/message-id/20100618094008.GA17483@feivel.credativ.lan

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: meskes@postgresql.org, markmapo@yahoo.com, satoshi.nagayasu@gmail.com
  Subject: Re: ECPG Documentation Improvement
  In-Reply-To: <20100618094008.GA17483@feivel.credativ.lan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox