Re: ECPG documentation

Lists: pgsql-hackerspgsql-interfaces
From: Tim Kane <timk(at)hotgames(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ECPG and FETCH
Date: 2000-01-05 07:24:51
Message-ID: 3872F1C3.8007B24B@hotgames.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-interfaces

First of all, ECPG doesn't seem to recognise the FETCH command at all,
returning with Syntax Error (see below).

Secondly, are there any postgres specific Embedded SQL docs around
'anywhere'?
I've already have a few difficulties with subtle differences between
different precompiler syntax, and it's becoming frustrating.

Thanks for any help!

Tim.

eg:

EXEC SQL DECLARE rowcur CURSOR FOR
SELECT prod_id, name, format
FROM products
WHERE name like '%ABC%';

EXEC SQL OPEN rowcur;

for (i=0; i<5; i++)
{
EXEC SQL FETCH rowcur INTO :prod_id, :title, :format;
// Do something.
}


From: Ivo Simicevic <ivo(at)ultra(dot)hr>
To: Tim Kane <timk(at)hotgames(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] ECPG and FETCH
Date: 2000-01-05 15:04:20
Message-ID: 20000105160420.A740@ultra.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-interfaces

On Wed, Jan 05, 2000 at 06:24:51PM +1100, Tim Kane wrote:
> EXEC SQL FETCH rowcur INTO :prod_id, :title, :format;
>

Try EXEC SQL FETCH IN rowcur ...

Ivo.


From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tim Kane <timk(at)hotgames(dot)com>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] ECPG and FETCH
Date: 2000-01-05 16:07:02
Message-ID: 38736C26.4A9B8777@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-interfaces

> Secondly, are there any postgres specific Embedded SQL docs around
> 'anywhere'?
> I've already have a few difficulties with subtle differences between
> different precompiler syntax, and it's becoming frustrating.

That's one of the holes in our documentation. If you get inspired to
write, we would welcome a contribution of any sort (including just
your notes on syntax as you learn to use the preprocessor). Our doc
sources are in sgml, but if you want to just write flat files I'll
convert it for you...

- Thomas

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California


From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Ivo Simicevic <ivo(at)ultra(dot)hr>
Cc: Postgres Hackers List <hackers(at)postgresql(dot)org>
Subject: Re: ECPG documentation
Date: 2000-01-05 18:10:14
Message-ID: 38738906.91E42C78@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-interfaces

(back on-list; hope that is OK...)

> I just wanted to let you know that some time ago, after contacting
> Michael Meskes I have started working on ECPG documentation.
> ... you can see some text file sketches on my web at
> http://www.ultra.hr/gpl/ecpg

Looks great! Hope you find time to get back to it, and I'll be happy
to help with sgml markup.

btw, if you could finish a first draft (or have enough sections to be
usable) within a month or so there is a good chance we can get it
included in the v7.0 release. Much later than that and we'll probably
miss the window...

- Thomas

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California


From: Michael Meskes <meskes(at)postgreSQL(dot)org>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] ECPG and FETCH
Date: 2000-01-05 18:30:59
Message-ID: 20000105193059.A13149@fam-meskes.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-interfaces

On Wed, Jan 05, 2000 at 06:24:51PM +1100, Tim Kane wrote:
> First of all, ECPG doesn't seem to recognise the FETCH command at all,
> returning with Syntax Error (see below).

FETCH IN should work as well as FETCH FROM. I think this is what standard
says. I once tried to add FETCH without IN but got some shift/reduce
conflicts. I haven't looked into it for quite some time, so maybe I can add
a compatibility rule. But don't bet on it.

> Secondly, are there any postgres specific Embedded SQL docs around
> 'anywhere'?

Unfortunately not much. But there are some (5 to be precise) demo files in
the source tree.

Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael(at)Fam-Meskes(dot)De | Use PostgreSQL!


From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Ivo Simicevic <ivo(at)ultra(dot)hr>
Cc: Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: ECPG documentation
Date: 2000-02-10 22:15:24
Message-ID: 38A3387C.2BFB489E@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-interfaces

> > > I just wanted to let you know that some time ago, after contacting
> > > Michael Meskes I have started working on ECPG documentation.
> > > ... you can see some text file sketches on my web at
> > > http://www.ultra.hr/gpl/ecpg
> > Looks great! Hope you find time to get back to it, and I'll be happy
> > to help with sgml markup.
> > btw, if you could finish a first draft (or have enough sections to be
> > usable) within a month or so there is a good chance we can get it
> > included in the v7.0 release. Much later than that and we'll probably
> > miss the window...

Hello Ivo. Have you had a chance to make progress on your docs? I'm
sure people would be *very* interested in them for the upcoming
release, and if you need some help on finishing the writing or editing
I'm sure there will be some volunteers.

Regards.

- Thomas

--
Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
South Pasadena, California


From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Ivo Simicevic <ivo(at)ultra(dot)hr>, Postgres Hackers List <hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Re: ECPG documentation
Date: 2000-02-12 10:56:47
Message-ID: 20000212115647.A5848@fam-meskes.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-interfaces

On Thu, Feb 10, 2000 at 10:15:24PM +0000, Thomas Lockhart wrote:
> Hello Ivo. Have you had a chance to make progress on your docs? I'm
> sure people would be *very* interested in them for the upcoming
> release, and if you need some help on finishing the writing or editing
> I'm sure there will be some volunteers.

I'm willing to help with explanations. But I won't have the time to write
docs in time for the release. In fact I even haven't found the time to
tackle my one and only todo item for 7.0.

BTW I have a problem with a user defined function. I posted a question about
some time ago but got no answer. The source is part of our source tree
(pgsql/src/interfaces/ecpg/test[test5.pgc|stp.pgc]).

I can insert it but when I execute it I get a result of -220 which is not
exactly the minimu of 14 and 7.

Any ideas? Just hitting make in ecpg/test should build the binaries. YOu
just have to adjust the path in test5.pgc.

Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael(at)Fam-Meskes(dot)De | Use PostgreSQL!


From: Stephen Birch <sbirch(at)ironmountainsystems(dot)com>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Ivo Simicevic <ivo(at)ultra(dot)hr>, Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: ECPG documentation
Date: 2005-01-05 23:16:07
Message-ID: 41DC7537.58091799@ironmountainsystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-interfaces

This looks really good. Please, please, please keep working on this
documentation.

Wish I'd had your work several months ago!!

Steve

Thomas Lockhart wrote:

> (back on-list; hope that is OK...)
>
> > I just wanted to let you know that some time ago, after contacting
> > Michael Meskes I have started working on ECPG documentation.
> > ... you can see some text file sketches on my web at
> > http://www.ultra.hr/gpl/ecpg
>
> Looks great! Hope you find time to get back to it, and I'll be happy
> to help with sgml markup.
>
> btw, if you could finish a first draft (or have enough sections to be
> usable) within a month or so there is a good chance we can get it
> included in the v7.0 release. Much later than that and we'll probably
> miss the window...
>
> - Thomas
>
> --
> Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
> South Pasadena, California
>
> ************