pgsql: Improved ECPG warning as suggested by Michael Paquier and remove

2021-08-17 Thread Michael Meskes
Improved ECPG warning as suggested by Michael Paquier and removed test case that triggers the warning during regression tests. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f576de1db1eeca63180b1ffa4b42b1e360f88577 Modified Files --

pgsql: Improved ECPG warning as suggested by Michael Paquier and remove

2021-08-17 Thread Michael Meskes
Improved ECPG warning as suggested by Michael Paquier and removed test case that triggers the warning during regression tests. Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e2d6da0708df2c2e244d8748c26ebc49c0963ed5 Modified Files --

pgsql: Fix connection handling for DEALLOCATE and DESCRIBE statements

2021-08-13 Thread Michael Meskes
Fix connection handling for DEALLOCATE and DESCRIBE statements After binding a statement to a connection with DECLARE STATEMENT the connection was still not used for DEALLOCATE and DESCRIBE statements. This patch fixes that, adds a missing warning and cleans up the code. Author: Hayato Kuroda

pgsql: Fix connection handling for DEALLOCATE and DESCRIBE statements

2021-08-13 Thread Michael Meskes
Fix connection handling for DEALLOCATE and DESCRIBE statements After binding a statement to a connection with DECLARE STATEMENT the connection was still not used for DEALLOCATE and DESCRIBE statements. This patch fixes that, adds a missing warning and cleans up the code. Author: Hayato Kuroda

pgsql: Need to step forward in the loop to get to an end.

2021-03-24 Thread Michael Meskes
Need to step forward in the loop to get to an end. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/65c2ec6f30d9c0878a9ef83e0ec9a53e6b82d9d8 Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 1 + 1 file changed, 1 insertion(+)

pgsql: Add DECLARE STATEMENT command to ECPG

2021-03-24 Thread Michael Meskes
Add DECLARE STATEMENT command to ECPG This command declares a SQL identifier for a SQL statement to be used in other embedded SQL statements. The identifier is linked to a connection. Author: Hayato Kuroda Reviewed-by: Shawn Wang Discussion:

pgsql: Fix ecpg crash with bytea and cursor variables.

2020-06-30 Thread Michael Meskes
Fix ecpg crash with bytea and cursor variables. Author: Jehan-Guillaume de Rorthais Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/70dc45e8cb76e0c612648ccefc433b7fb2b16c2b Modified Files -- src/interfaces/ecpg/preproc/ecpg.header|

pgsql: Fix ecpg crash with bytea and cursor variables.

2020-06-30 Thread Michael Meskes
Fix ecpg crash with bytea and cursor variables. Author: Jehan-Guillaume de Rorthais Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e576f71fbe713d9357d1b480b4993043f7fcc73a Modified Files -- src/interfaces/ecpg/preproc/ecpg.header| 9 +-

pgsql: Fix ecpg crash with bytea and cursor variables.

2020-06-30 Thread Michael Meskes
Fix ecpg crash with bytea and cursor variables. Author: Jehan-Guillaume de Rorthais Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/6425d6f6aa1af8b2db94ade64107fb268a7f114c Modified Files -- src/interfaces/ecpg/preproc/ecpg.header|

pgsql: Fix small memory leak in ecpglib ecpg_update_declare_statement()

2019-07-08 Thread Michael Meskes
Fix small memory leak in ecpglib ecpg_update_declare_statement() is called the second time. Author: "Zhang, Jie" Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/58006f8041fffc9260b92fc2cb3a571aaa6c6d22 Modified Files --

pgsql: Use strtoint() instead of strtol() in pgtypeslib where the resul

2019-07-02 Thread Michael Meskes
Use strtoint() instead of strtol() in pgtypeslib where the result is stored in an int variable. Author: Yang Xiao Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8372e3c98fbbd529e4545c4d7982e278e118958e Modified Files --

pgsql: Fix small memory leak in ecpglib ecpg_update_declare_statement()

2019-07-02 Thread Michael Meskes
Fix small memory leak in ecpglib ecpg_update_declare_statement() is called the second time. Author: "Zhang, Jie" Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e72489e101b21c328e3d10ca64e5367c60f424a5 Modified Files --

pgsql: Made ecpg compatibility mode and run-time behaviour options case

2019-07-02 Thread Michael Meskes
Made ecpg compatibility mode and run-time behaviour options case insensitive. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/75220fb62b1387b61f92c42b1bd147cb30607012 Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 8 1 file changed, 4

Re: pgsql: Implement PREPARE AS statement for ECPG.

2019-05-22 Thread Michael Meskes
tion of the new code in ecpglib/prepare.c is broken.) What's wrong? I fixed the original one to stop my gcc from complaining, but maybe I missed a piece. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Meskes at (Debian|Postgresql) dot Org Jabber: mich

pgsql: Implement PREPARE AS statement for ECPG.

2019-05-21 Thread Michael Meskes
Implement PREPARE AS statement for ECPG. Besides implementing the new statement this change fix some issues with the parsing of PREPARE and EXECUTE statements. The different forms of these statements are now all handled in a ujnified way. Author: Matsumura-san Branch -- master Details

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e7e71b9e1ecb8cb6eb490b0c82bdc5aa9604368b Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/12c42a543ac80f44e02173c2d6d51ffe18de2703 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ed16ba3248d486ec8b2fdfc75e442620d675b617 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file changed,

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/67f6e645e7acf356abb1b914a1d8536708ec0f67 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/77300684867f93aebd29de106f8adcf0797bcb21 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file

pgsql: Fix off-by-one check that can lead to a memory overflow in ecpg.

2019-04-11 Thread Michael Meskes
Fix off-by-one check that can lead to a memory overflow in ecpg. Patch by Liu Huailing Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0ba09cc026985536586b7fd58ceddee16ea739d7 Modified Files -- src/interfaces/ecpg/preproc/pgc.l | 2 +- 1 file

pgsql: Use correct connection name variable in ecpglib.

2019-03-15 Thread Michael Meskes
Use correct connection name variable in ecpglib. Fixed-by: Kuroda-san Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c21d6033f77353623f8642c5541e0d002d986f59 Modified Files -- src/interfaces/ecpg/ecpglib/prepare.c | 2 +- 1 file changed, 1

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8cdce0a455ff885e99d672dbd8edbd217d68139f Modified Files --

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e7e78f1598281a7543be563fb19c79b99826c943 Modified Files --

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e7adda86ba9c8dc1d0db07d0049ccfff42082a0e Modified Files --

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/72f725ab25bdf4ad12c9586521935eb9307fcfe1 Modified Files --

pgsql: Fix ecpglib regression that made it impossible to close a cursor

2019-03-11 Thread Michael Meskes
Fix ecpglib regression that made it impossible to close a cursor that was opened in a prepared statement. Patch by: "Kuroda, Hayato" Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/98bdaab0d918169a36d64a06667a809c673ec065 Modified Files --

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/08cecfaf60c484f219ba7e6ee23e9699aea4e9af Modified Files --

pgsql: Fix potential memory access violation in ecpg if filename of inc

2019-03-11 Thread Michael Meskes
Fix potential memory access violation in ecpg if filename of include file is shorter than 2 characters. Patch by: "Wu, Fei" Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5469a1e78c92a3ce9ed232583273c53223e83b63 Modified Files --

pgsql: Free memory in ecpg bytea regression test.

2019-02-26 Thread Michael Meskes
Free memory in ecpg bytea regression test. While not really a problem it's easier to run tools like valgrind against it when fixed. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/42ccbe4351e4c0b1ad1684323c2fea79c86ae573 Modified Files --

pgsql: Properly end string to make sure ecpglib does not read beyond it

2019-02-18 Thread Michael Meskes
Properly end string to make sure ecpglib does not read beyond its boundaries. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8e6ab9f8012ff54d2e3cf2804db811e5f8eada1b Modified Files -- src/interfaces/ecpg/ecpglib/execute.c | 3 ++- 1 file changed, 2

pgsql: Sync ECPG's CREATE TABLE AS statement with backend's.

2019-02-18 Thread Michael Meskes
Sync ECPG's CREATE TABLE AS statement with backend's. Author: Higuchi-san ("Higuchi, Daisuke" ) Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/3530c508ca68d47cd5a30a1a28f99bdd23cb90c8 Modified Files -- src/interfaces/ecpg/preproc/ecpg.trailer

pgsql: Sync ECPG's CREATE TABLE AS statement with backend's.

2019-02-18 Thread Michael Meskes
Sync ECPG's CREATE TABLE AS statement with backend's. Author: Higuchi-san ("Higuchi, Daisuke" ) Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/180606b6851edd447bde566fea24e67557ae016f Modified Files -- src/interfaces/ecpg/preproc/ecpg.trailer

pgsql: Sync ECPG's CREATE TABLE AS statement with backend's.

2019-02-18 Thread Michael Meskes
Sync ECPG's CREATE TABLE AS statement with backend's. Author: Higuchi-san ("Higuchi, Daisuke" ) Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f647a5fb0d63c43de7daf7c31a59a6fc98b9a6a1 Modified Files -- src/interfaces/ecpg/preproc/ecpg.trailer

pgsql: Sync ECPG's CREATE TABLE AS statement with backend's.

2019-02-18 Thread Michael Meskes
Sync ECPG's CREATE TABLE AS statement with backend's. Author: Higuchi-san ("Higuchi, Daisuke" ) Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e81f0e3113e6d9791285e6629d5301759839f3c9 Modified Files -- src/interfaces/ecpg/preproc/ecpg.trailer

pgsql: Add bytea datatype to ECPG.

2019-02-18 Thread Michael Meskes
Add bytea datatype to ECPG. So far ECPG programs had to treat binary data for bytea column as 'char' type. But this meant converting from/to escaped format with PQunescapeBytea/ PQescapeBytea() and therefore forcing users to add unnecessary code and cost for the conversion in runtime. By adding a

pgsql: Add DECLARE STATEMENT support to ECPG.

2019-02-16 Thread Michael Meskes
Add DECLARE STATEMENT support to ECPG. DECLARE STATEMENT is a statement that lets users declare an identifier pointing at a connection. This identifier will be used in other embedded dynamic SQL statement such as PREPARE, EXECUTE, DECLARE CURSOR and so on. When connecting to a non-default

pgsql: Change error handling of out of scope variables in ecpg.

2019-01-30 Thread Michael Meskes
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

pgsql: Make some ecpg test cases more robust against unexpected errors

2019-01-30 Thread Michael Meskes
Make some ecpg test cases more robust against unexpected errors that happen during development. Test cases themselves should not hang or segfault. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e2f731cdba9b7a79cddc64325990a8f51818877b Modified Files --

Re: pgsql: Move strtoint() to common

2018-03-16 Thread Michael Meskes
Am 15.03.2018 um 23:57 schrieb Tom Lane: > Oh ... duh. We've been assuming that the strtoint change broke it, > but that's wrong. The test case that is failing is new as of yesterday, > and the correct answer is that it's never worked on Windows. See > ... Correct, thanks for figuring this out

Re: pgsql: Add Oracle like handling of char arrays.

2018-03-14 Thread Michael Meskes
> Please check these compiler warnings: > ... Fixed, thanks. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Meskes at (Debian|Postgresql) dot Org Jabber: michael at xmpp dot meskes dot org VfL Borussia! Força Barça! SF 49ers! Use Debian GNU

pgsql: Add Oracle like handling of char arrays.

2018-03-13 Thread Michael Meskes
Add Oracle like handling of char arrays. In some cases Oracle Pro*C handles char array differently than ECPG. This patch adds a Oracle compatibility mode to make ECPG behave like Pro*C. Patch by David Rader Branch -- master Details ---

pgsql: Fix double frees in ecpg.

2018-03-13 Thread Michael Meskes
Fix double frees in ecpg. Patch by Patrick Krecker Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8e3f3ab5b85a230e9a008c743402c3e5a43085a1 Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 5 - 1 file changed, 4

pgsql: Fix double frees in ecpg.

2018-03-13 Thread Michael Meskes
Fix double frees in ecpg. Patch by Patrick Krecker Branch -- REL9_3_STABLE Details --- https://git.postgresql.org/pg/commitdiff/09f4ca92bbe5a68b228d6a3251e4d2be31bb6377 Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 5 - 1 file changed, 4

pgsql: Fix double frees in ecpg.

2018-03-13 Thread Michael Meskes
Fix double frees in ecpg. Patch by Patrick Krecker Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/db2fc801f66a70969cbdd5673ed9d02025c70695 Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 5 - 1 file changed, 4

pgsql: Fix double frees in ecpg.

2018-03-13 Thread Michael Meskes
Fix double frees in ecpg. Patch by Patrick Krecker Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/fcc15bf38100edf26b38c73a809579fc0e9ccc78 Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 5 - 1 file changed, 4

pgsql: Fix double frees in ecpg.

2018-03-13 Thread Michael Meskes
Fix double frees in ecpg. Patch by Patrick Krecker Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/837d4f739ccf16091d41649a9d22d7e911636a3b Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 5 - 1 file changed, 4

pgsql: Fix double frees in ecpg.

2018-03-13 Thread Michael Meskes
Fix double frees in ecpg. Patch by Patrick Krecker Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8559b40c5e3fb068d0dfd81d4a5a9f7411f2cbba Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 5 - 1 file changed, 4

pgsql: Set connection back to NULL after freeing it.

2018-03-13 Thread Michael Meskes
Set connection back to NULL after freeing it. Patch by Jeevan Ladhe Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/fe65f5931942e6aa7ff0f185cd777eb8d635e3ae Modified Files -- src/interfaces/ecpg/preproc/output.c |

pgsql: Set connection back to NULL after freeing it.

2018-03-13 Thread Michael Meskes
Set connection back to NULL after freeing it. Patch by Jeevan Ladhe Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b32fad52e94307261471d05a79c70f8382d71657 Modified Files -- src/interfaces/ecpg/preproc/output.c | 3 +++

pgsql: Set connection back to NULL after freeing it.

2018-03-13 Thread Michael Meskes
Set connection back to NULL after freeing it. Patch by Jeevan Ladhe Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/bd7eb6fe65b34963135851f06210d8e5fe048ef4 Modified Files -- src/interfaces/ecpg/preproc/output.c |

pgsql: Set connection back to NULL after freeing it.

2018-03-13 Thread Michael Meskes
Set connection back to NULL after freeing it. Patch by Jeevan Ladhe Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/44a36a8d9a6e7ba209253d694dd2ebf3e13f0b5d Modified Files -- src/interfaces/ecpg/preproc/output.c |

pgsql: Set connection back to NULL after freeing it.

2018-03-13 Thread Michael Meskes
Set connection back to NULL after freeing it. Patch by Jeevan Ladhe Branch -- REL9_3_STABLE Details --- https://git.postgresql.org/pg/commitdiff/042badc3778ade0f430049eb7dac03972e544e5a Modified Files -- src/interfaces/ecpg/preproc/output.c |

pgsql: Set connection back to NULL after freeing it.

2018-03-13 Thread Michael Meskes
Set connection back to NULL after freeing it. Patch by Jeevan Ladhe Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/95f0260218ba5882828c245710964c828da6fb26 Modified Files -- src/interfaces/ecpg/preproc/output.c |

pgsql: Cope with indicator arrays that do not have the correct length.

2018-01-15 Thread Michael Meskes
Cope with indicator arrays that do not have the correct length. Patch by: "Rader, David" Branch -- REL9_3_STABLE Details --- https://git.postgresql.org/pg/commitdiff/a0f5890a64e8a5d593b762183682b73ea72f2fe1 Modified Files --

pgsql: Cope with indicator arrays that do not have the correct length.

2018-01-15 Thread Michael Meskes
Cope with indicator arrays that do not have the correct length. Patch by: "Rader, David" Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4eae1e6f5da8e7cd011c483d867b5bd8e92c7955 Modified Files --

pgsql: Cope with indicator arrays that do not have the correct length.

2018-01-15 Thread Michael Meskes
Cope with indicator arrays that do not have the correct length. Patch by: "Rader, David" Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8b89b7aaca42d9f1b0798aebb84b088dd0b092fa Modified Files --

pgsql: Cope with indicator arrays that do not have the correct length.

2018-01-15 Thread Michael Meskes
Cope with indicator arrays that do not have the correct length. Patch by: "Rader, David" Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/2c1c4b060c4381a83dd0500a73b26eb7dea4c693 Modified Files --

pgsql: Cope with indicator arrays that do not have the correct length.

2018-01-15 Thread Michael Meskes
Cope with indicator arrays that do not have the correct length. Patch by: "Rader, David" Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f082ef83688b036437e580f42894f674534fdb24 Modified Files --

pgsql: Cope with indicator arrays that do not have the correct length.

2018-01-13 Thread Michael Meskes
Cope with indicator arrays that do not have the correct length. Patch by: "Rader, David" Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/649aeb123f73e69cf78c52b534c15c51a229d63d Modified Files -- src/interfaces/ecpg/preproc/type.c

pgsql: Fix parsing of compatibility mode argument.

2018-01-12 Thread Michael Meskes
Fix parsing of compatibility mode argument. Patch by Ashutosh Sharma Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ca4587f3f94f5c33da6543535f666a9f20f3ef33 Modified Files -- src/interfaces/ecpg/preproc/ecpg.c | 4 ++-- 1 file