pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Change error handling of out of scope variables in ecpg.
3+ messages / 3 participants
[nested] [flat]

* pgsql: Change error handling of out of scope variables in ecpg.
@ 2019-01-30 13:37  Michael Meskes <meskes@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Meskes @ 2019-01-30 13:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Change error handling of out of scope variables in ecpg.

The function called can result in an out of memory error that subsequently was
disregarded. Instead it should set the appropriate SQL error variables and be
checked by whatever whenever statement is defined.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7ea38f045dad6bbb7fbe807f2486df7370bc0b0f

Modified Files
--------------
src/interfaces/ecpg/ecpglib/misc.c                 | 11 ++++++++++
src/interfaces/ecpg/preproc/ecpg.addons            | 17 ++++++---------
src/interfaces/ecpg/preproc/ecpg.trailer           |  6 +-----
src/interfaces/ecpg/preproc/output.c               |  4 +++-
src/interfaces/ecpg/preproc/preproc_extern.h       |  2 +-
.../ecpg/test/expected/compat_informix-sqlda.c     |  4 ++--
.../test/expected/compat_informix-test_informix.c  |  7 +++++-
src/interfaces/ecpg/test/expected/preproc-cursor.c | 25 ++++++++++++++++++++++
.../ecpg/test/expected/preproc-outofscope.c        |  5 +++++
src/interfaces/ecpg/test/expected/sql-binary.c     | 15 +++++++++++++
10 files changed, 75 insertions(+), 21 deletions(-)



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

* Re: pgsql: Change error handling of out of scope variables in ecpg.
@ 2019-01-30 17:52  David Rowley <david.rowley@2ndquadrant.com>
  parent: Michael Meskes <meskes@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: David Rowley @ 2019-01-30 17:52 UTC (permalink / raw)
  To: Michael Meskes <meskes@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

On Thu, 31 Jan 2019 at 02:38, Michael Meskes <meskes@postgresql.org> wrote:
> Change error handling of out of scope variables in ecpg.
>
> The function called can result in an out of memory error that subsequently was
> disregarded. Instead it should set the appropriate SQL error variables and be
> checked by whatever whenever statement is defined.

I might be missing something here, but if you're changing the
signature of output_simple_statement(), wouldn't you also need to
change all calls to it too? ...  including the ones in preproc.y?

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services




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

* Re: pgsql: Change error handling of out of scope variables in ecpg.
@ 2019-01-30 17:59  Tom Lane <tgl@sss.pgh.pa.us>
  parent: David Rowley <david.rowley@2ndquadrant.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2019-01-30 17:59 UTC (permalink / raw)
  To: David Rowley <david.rowley@2ndquadrant.com>; +Cc: Michael Meskes <meskes@postgresql.org>; pgsql-committers@lists.postgresql.org

David Rowley <david.rowley@2ndquadrant.com> writes:
> I might be missing something here, but if you're changing the
> signature of output_simple_statement(), wouldn't you also need to
> change all calls to it too? ...  including the ones in preproc.y?

preproc.y is a generated file, not something that lives in git.

			regards, tom lane




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


end of thread, other threads:[~2019-01-30 17:59 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 13:37 pgsql: Change error handling of out of scope variables in ecpg. Michael Meskes <meskes@postgresql.org>
2019-01-30 17:52 ` David Rowley <david.rowley@2ndquadrant.com>
2019-01-30 17:59   ` Tom Lane <tgl@sss.pgh.pa.us>

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