Re: [BUG] Storage declaration in ECPG

2022-09-09 Thread Tom Lane
Andrey Sokolov writes: > [ v2-0001-Fix-storage-declaration-in-ECPG.patch ] Pushed. I didn't think a whole new test case was appropriate, either from the patch-footprint or test-runtime standpoint, so I just added a couple of declarations to preproc/variable.pgc. regards,

Re: [BUG] Storage declaration in ECPG

2022-09-07 Thread Andrey Sokolov
05.09.2022, 11:12, "Kyotaro Horiguchi" : About the test, don't we need the test for non-varchar/bytea staticvariables like "static int inta, intb, intc;"?Good idea, thanks. I have added tests for static int and bytea. The new patch is in the attachment and here https://github.com/andr-sokolov/postg

Re: [BUG] Storage declaration in ECPG

2022-09-05 Thread Kyotaro Horiguchi
At Sun, 04 Sep 2022 13:49:53 +0300, Andrey Sokolov wrote in > Hi, > > The ECPG preprocessor converts the code > "static VARCHAR str1[10], str2[20], str3[30];" > into > "static struct varchar_1 { int len; char arr[ 10 ]; } str1 ; > struct varchar_2 { int len; char arr[ 20 ]; } str2