Re: ECPG Documentation Improvement - Mailing list pgsql-interfaces
From | Mark Richardson |
---|---|
Subject | Re: ECPG Documentation Improvement |
Date | |
Msg-id | 695459.74507.qm@web53308.mail.re2.yahoo.com Whole thread Raw |
In response to | ECPG Documentation Improvement (Satoshi Nagayasu <satoshi.nagayasu@gmail.com>) |
Responses |
Re: ECPG Documentation Improvement
Re: ECPG Documentation Improvement |
List | pgsql-interfaces |
Here's some info that I found... For conversion of Sybase .pc files to postgres .pgc files, you have to parse the .pc file and change from sybase format to postgres format. We used a simple script but here's what we changed the following (sybase is first column, postgres is second - quotes are used just to indicate the entire string, you don't need them in the search/replace) "INCLUDE SQLCA" "INCLUDE sqlca" "SQLCA" "struct sqlca_t" "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" "SQL CONNECT :" "SQL CONNECT TO :dbName_ USER:" "CHAINED OFF" "CHAINED TO OFF" "CHAINED ON" "CHAINED TO ON" 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'); If you have more questions I can dig in the code and find answers for you. Mark --- On Thu, 6/17/10, Satoshi Nagayasu <satoshi.nagayasu@gmail.com> wrote:
|
pgsql-interfaces by date: