Re: ECPG Documentation Improvement

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Mark Richardson <markmapo(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org, Satoshi Nagayasu <satoshi(dot)nagayasu(at)gmail(dot)com>
Subject: Re: ECPG Documentation Improvement
Date: 2010-06-18 09:40:08
Message-ID: 20100618094008.GA17483@feivel.credativ.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-interfaces

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(at)jabber(dot)org
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Heikki Linnakangas 2010-06-18 15:56:37 Re: ECPG Documentation Improvement
Previous Message Satoshi Nagayasu 2010-06-18 08:05:53 Re: ECPG Documentation Improvement

Browse pgsql-interfaces by date

  From Date Subject
Next Message Heikki Linnakangas 2010-06-18 15:56:37 Re: ECPG Documentation Improvement
Previous Message Satoshi Nagayasu 2010-06-18 08:05:53 Re: ECPG Documentation Improvement