Re: Print warning when I execute my own extension function

2022-02-20 Thread Dong Wook Lee
now I found a bug in this code. I found the code of this part below is wrong ``` char *buffer = palloc(7 * sizeof(char)); >> unsigned int offset = sizeof(buffer); // wrong buffer[--offset] = '\0'; /* here */ ``` Thank you for replying 2022년 2월 20일 (일) 오후 11:51, Dong Wook Lee 님이 작성: > > I found a

Re: Print warning when I execute my own extension function

2022-02-20 Thread Dong Wook Lee
I found a source code line that prints warning in the source code (src/backend/utils/mmgr/aset.c, line 1496) /* │ 1492 * Check for overwrite of padding space in an allocated chunk. │ 1493

Re: Print warning when I execute my own extension function

2022-02-20 Thread Julien Rouhaud
Hi, On Sun, Feb 20, 2022 at 07:23:56PM +0900, Dong Wook Lee wrote: > Hi hackers, > I've read in this blog ( > http://big-elephants.com/2015-10/writing-postgres-extensions-part-i/) > and I wrote an extension about base36_encode with c code > but when I executed a query like this below I got a warni

Print warning when I execute my own extension function

2022-02-20 Thread Dong Wook Lee
Hi hackers, I've read in this blog ( http://big-elephants.com/2015-10/writing-postgres-extensions-part-i/) and I wrote an extension about base36_encode with c code but when I executed a query like this below I got a warning below. ``` postgres=# SELECT base36_encode(123); WARNING: problem in allo