pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Embedded C SQL Error -600
3+ messages / 3 participants
[nested] [flat]

* Embedded C SQL Error -600
@ 2003-03-11 12:11 Mike Alford <mikea@syscon-intl.com>
  2003-03-21 15:11 ` Re: Embedded C SQL Error -600 Michael Meskes <meskes@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Mike Alford @ 2003-03-11 12:11 UTC (permalink / raw)
  To: pgsql-interfaces

Using  PostgreSQL 7.3.1 on a customized Linux slackware host 8.0.0 
I am receiving an error -600 from this bit of code:

    EXEC SQL FETCH FROM test_cursor
        INTO :mach_seq, :ss_mseq, :child_idx, :job, :net_pieces, :start_time;
    printf ("b4 while test_cursor_select SQLCODE %d\n", SQLCODE);
    while (SQLCODE != ECPG_NOT_FOUND)
//  while (!SQLCODE)
        {
        EXEC SQL FETCH FROM test_cursor
        INTO :mach_seq, :ss_mseq, :child_idx, :job, :net_pieces, :start_time;
        EXEC SQL FETCH FROM test_cursor
        INTO :mach_seq, :ss_mseq, :child_idx, :job, :net_pieces, :start_time;
        }

in ecpgerrno.h this entry:
/* backend WARNINGs, starting at 600 */
#define ECPG_WARNING_UNRECOGNIZED          -600
 /* WARNING:  (transaction aborted): queries ignored until END */
implies that a transaction with this code would be aborted, as well as not
being too informative about the nature of the problem.

The commented line '//  while (!SQLCODE)'  fits the style of existing code
better.

I get the output I would expect if there were no problem:
b4 while test_cursor_select SQLCODE -600
i 0 machseq 73374, ssmseq 3404562 child 0 job 410F 3              , net
pieces 0, start_time 2003-02-10 11:00:00
i 0 machseq 73374, ssmseq 3404562 child 1 job 410F 3              , net
pieces 254, start_time 2003-02-10 11:00:00
i 0 machseq 73374, ssmseq 3404562 child 2 job 410F 3              , net
pieces 508, start_time 2003-02-10 11:00:00
i 0 machseq 73374, ssmseq 3404562 child 3 job 410F 3              , net
pieces 762, start_time 2003-02-10 11:00:00

Is this an error that can be ignored? If not, what should I be looking for?

Heisenberg may have slept here




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Embedded C SQL Error -600
  2003-03-11 12:11 Embedded C SQL Error -600 Mike Alford <mikea@syscon-intl.com>
@ 2003-03-21 15:11 ` Michael Meskes <meskes@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Meskes @ 2003-03-21 15:11 UTC (permalink / raw)
  To: Mike Alford <mikea@syscon-intl.com>; +Cc: pgsql-interfaces

On Tue, Mar 11, 2003 at 12:11:55PM +0000, Mike Alford wrote:
> Using  PostgreSQL 7.3.1 on a customized Linux slackware host 8.0.0 
> I am receiving an error -600 from this bit of code:
> ...

It would be interesting to see which message was printed in
sqlca.sqlerrm.sqlerrmc resp. the logfile. -600 usually means a backend
notice that does not start with WARNING:.

Michael
-- 
Michael Meskes
Email: Michael@Fam-Meskes.De
ICQ: 179140304
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Embedded C SQL Error -600
@ 2003-03-12 15:23 Christoph Haller <ch@rodos.fzk.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Christoph Haller @ 2003-03-12 15:23 UTC (permalink / raw)
  To: pgsql-interfaces; +Cc: mikea@syscon-intl.com

>
> Using  PostgreSQL 7.3.1 on a customized Linux slackware host 8.0.0
> I am receiving an error -600 from this bit of code:
>
>     EXEC SQL FETCH FROM test_cursor
>         INTO :mach_seq, :ss_mseq, :child_idx, :job, :net_pieces,
:start_time;
>     printf ("b4 while test_cursor_select SQLCODE %d\n", SQLCODE);
>     while (SQLCODE != ECPG_NOT_FOUND)
> //  while (!SQLCODE)
>         {
>         EXEC SQL FETCH FROM test_cursor
>         INTO :mach_seq, :ss_mseq, :child_idx, :job, :net_pieces,
:start_time;
>         EXEC SQL FETCH FROM test_cursor
>         INTO :mach_seq, :ss_mseq, :child_idx, :job, :net_pieces,
:start_time;
>         }
>
> in ecpgerrno.h this entry:
> /* backend WARNINGs, starting at 600 */
> #define ECPG_WARNING_UNRECOGNIZED          -600
>  /* WARNING:  (transaction aborted): queries ignored until END */
> implies that a transaction with this code would be aborted, as well as
not
> being too informative about the nature of the problem.
>
> The commented line '//  while (!SQLCODE)'  fits the style of existing
code
> better.
>
> I get the output I would expect if there were no problem:
> b4 while test_cursor_select SQLCODE -600
> i 0 machseq 73374, ssmseq 3404562 child 0 job 410F 3              ,
net
> pieces 0, start_time 2003-02-10 11:00:00
> i 0 machseq 73374, ssmseq 3404562 child 1 job 410F 3              ,
net
> pieces 254, start_time 2003-02-10 11:00:00
> i 0 machseq 73374, ssmseq 3404562 child 2 job 410F 3              ,
net
> pieces 508, start_time 2003-02-10 11:00:00
> i 0 machseq 73374, ssmseq 3404562 child 3 job 410F 3              ,
net
> pieces 762, start_time 2003-02-10 11:00:00
>
> Is this an error that can be ignored? If not, what should I be looking
for?
>
No, do not ignore errors. The bit of code does not show if
it's enclosed within a transaction block (BEGIN - END). Is it?

Regards, Christoph





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-03-21 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-11 12:11 Embedded C SQL Error -600 Mike Alford <mikea@syscon-intl.com>
2003-03-21 15:11 ` Michael Meskes <meskes@postgresql.org>
2003-03-12 15:23 Re: Embedded C SQL Error -600 Christoph Haller <ch@rodos.fzk.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox