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.
}





Wed, 05 Jan 2000 18:24:51 +1100
Tim Kane <timk@hotgames.com>
ECPG and FETCH
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.

Wed, 5 Jan 2000 16:04:20 +0100
Ivo Simicevic <ivo@ultra.hr>
Re: [INTERFACES] ECPG and FETCH
> 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@alumni.caltech.edu
South Pasadena, California

Wed, 05 Jan 2000 16:07:02 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: [INTERFACES] ECPG and FETCH
(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@alumni.caltech.edu
South Pasadena, California

Wed, 05 Jan 2000 18:10:14 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: ECPG documentation
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@Fam-Meskes.De           | Use PostgreSQL!

Wed, 5 Jan 2000 19:30:59 +0100
Michael Meskes <meskes@postgreSQL.org>
Re: [INTERFACES] ECPG and FETCH
> > > 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@alumni.caltech.edu
South Pasadena, California

Thu, 10 Feb 2000 22:15:24 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: [HACKERS] Re: ECPG documentation
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@Fam-Meskes.De           | Use PostgreSQL!

Sat, 12 Feb 2000 11:56:47 +0100
Michael Meskes <meskes@postgresql.org>
Re: [HACKERS] Re: ECPG documentation
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@alumni.caltech.edu
> South Pasadena, California
>
> ************


Wed, 05 Jan 2005 15:16:07 -0800
Stephen Birch <sbirch@ironmountainsystems.com>
Re: [HACKERS] Re: ECPG documentation