Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 3C3EC632C23 for ; Thu, 17 Jun 2010 16:27:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 27492-01 for ; Thu, 17 Jun 2010 19:27:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web53308.mail.re2.yahoo.com (web53308.mail.re2.yahoo.com [206.190.49.98]) by mail.postgresql.org (Postfix) with SMTP id 73AD7632A99 for ; Thu, 17 Jun 2010 16:27:35 -0300 (ADT) Received: (qmail 76241 invoked by uid 60001); 17 Jun 2010 19:27:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1276802853; bh=jweEi+IZOp8YaXyjaGziBorteEzNUY1FmPJ/+YEjd/U=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=Hx4vW+bHUDRkY3hR6EQPnFJdXbeXtCGojddgWeFNVR2NGVl4t0w5ckKh2MOF6ryV5MFM6aJIyTLqbsFxNpF4svbIHVqJOzSuhPgPXpRr0fjRlo0bVq0GBcR9EgqN5qyTtugm5z9RWVnahFXr785xycbvmP0oQHHpvOMddJ0QPGg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=puOIsUx+dPz1czfkNaoHXtt3ONy2SWolNBmoAKn4elEn4kAnpqHFZvLiOBnnof1WX9Nhsr/mscjoLZMH0mHY1fsEjW5x2XqtRG4YLP0IR6FM5rm3zOvpsWph1/ZMMkcrM3yrjzV5NFdMoeaEGWwlvluMTf7d8lIxMhhK576UzFc=; Message-ID: <695459.74507.qm@web53308.mail.re2.yahoo.com> X-YMail-OSG: t7zDOcQVM1mc1FviM6LppIBXXel7Xi6TF21uE3EYRCCIf4d vO56l3A0AsyPaPcW2.3SGmQrxbmLwPoQBbFiVeEeD1bJ_clYB344QG89So9q gri1tqj7vKJql4GM.p8BcS90QpAsGCsh.CzlHIbOS4_h8nIhvkjxKdWjVRG2 1wdR8V2Lop6e_9RbrU1sMyBkLuK1wdPI73Sgc.50aCsLDi3wBYRam5AGsu5i jCZdpeuIkNAw18fK4qMrJlsl0Arp9oKtn18zN1Q2vMTTBlvuABJgIisLFdJG 5NM975AJ5Bhkn04Z8tyxj9gapvogi_uanmb08RjNOL2.1HaRM4S.3yYzXR48 HuBF.m2XB6mORYRQfob.lxlrqGFi3oy4kOrxGc.4auSftPg-- Received: from [204.27.253.4] by web53308.mail.re2.yahoo.com via HTTP; Thu, 17 Jun 2010 12:27:33 PDT X-Mailer: YahooMailClassic/11.1.4 YahooMailWebService/0.8.103.269680 Date: Thu, 17 Jun 2010 12:27:33 -0700 (PDT) From: Mark Richardson Subject: Re: ECPG Documentation Improvement To: pgsql-interfaces@postgresql.org Cc: Satoshi Nagayasu In-Reply-To: <4C19E5B9.3040002@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-241539950-1276802853=:74507" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.509 tagged_above=-5 required=5 tests=BAYES_05=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/2 X-Sequence-Number: 6903 --0-241539950-1276802853=:74507 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Here's some info that I found... =A0 For conversion of Sybase .pc files to postgres .pgc files, you have to pars= e the .pc file and change from sybase format to postgres format.=A0 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 st= ring, 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" =A0 =A0 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'); =A0 If you have more questions I can dig in the code and find answers for you. Mark --- On Thu, 6/17/10, Satoshi Nagayasu wrote: From: Satoshi Nagayasu Subject: [INTERFACES] ECPG Documentation Improvement To: pgsql-interfaces@postgresql.org, pgsql-docs@postgresql.org Cc: "Bruce Momjian" , "Michael Meskes" Date: Thursday, June 17, 2010, 3:07 AM Hi all, I'm trying to improve the ECPG documents for the ECPG application developrs, because some of my clients want more detailed information when they develop (or migrate) an embeded SQL applications. Of course, I want to contribute this work to the official manual. So I have one thing to introduce to you, and thing to ask you. At first, I've done writing ECPG directives. I think it could be useful for the ECPG application developers, similar to the SQL reference section in the official manual. ecpgdocs @ GoogleCode (I'm working here.) http://code.google.com/p/ecpgdocs/ ecpgdocs downloads (You can find the current document.) http://code.google.com/p/ecpgdocs/downloads/list?deleted=3D1&ts=3D127676394= 8 However, I'm not familiar with ECPG details or internals, so here is one asking, I hope someone to review my documents and give some feedback to me. Feedbacks which I'm expecting are: - Is this document useful? - Missing directives. - Missing or wrong synopsis. - More appropriate descriptions on parameters or examples. - How to contribute this to the official manual. - Correcting English. (sorry for my poor English.) - etc... Honestly, I'm not familiar with the documentation acceptance/review process= , so any advice and/or comments are welcome. Regards, --=20 NAGAYASU Satoshi --=20 Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-interfaces =0A=0A=0A --0-241539950-1276802853=:74507 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
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 i= s first column, postgres is second - quotes are used just to indicate the e= ntire 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.nagaya= su@gmail.com> wrote:

From: Satoshi Nagayasu <satoshi.nagayasu@gmail= .com>
Subject: [INTERFACES] ECPG Documentation Improvement
To: pgs= ql-interfaces@postgresql.org, pgsql-docs@postgresql.org
Cc: "Bruce Momji= an" <bruce@momjian.us>, "Michael Meskes" <meskes@postgresql.org>= ;
Date: Thursday, June 17, 2010, 3:07 AM

Hi all,

I'm trying to improve the ECPG docume= nts for the ECPG application
developrs, because some of my clients want = more detailed information
when they develop (or migrate) an embeded SQL = applications.
Of course, I want to contribute this work to the official = manual.

So I have one thing to introduce to you, and thing to ask yo= u.

At first, I've done writing ECPG directives.
I think it could = be useful for the ECPG application developers,
similar to the SQL refere= nce section in the official manual.

ecpgdocs @ GoogleCode (I'm worki= ng here.)
http://code.google.com/p/ecpgdocs/

ecpgdocs downloads (You can = find the current document.)
http://code.google.com/p/ecpgdocs/downloads/list?deleted= =3D1&ts=3D1276763948

However, I'm not familiar with ECPG det= ails or internals,
so here is one asking, I hope someone to review my do= cuments
and give some feedback to me.

Feedbacks which I'm expecti= ng are:

- Is this document useful?
- Missing directives.
- Mis= sing or wrong synopsis.
- More appropriate descriptions on parameters or= examples.
- How to contribute this to the official manual.
- Correct= ing English. (sorry for my poor English.)
- etc...

Honestly, I'm = not familiar with the documentation acceptance/review process,
so any ad= vice and/or comments are welcome.

Regards,
--
NAGAYASU Satosh= i <satoshi.naga= yasu@gmail.com>

--
Sent via pgsql-interfaces mailing list= (pgsql-inte= rfaces@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces

=0A=0A --0-241539950-1276802853=:74507--