Re: using worker_spi as pattern

2018-03-09 Thread Jeremy Finzel
On Fri, Mar 9, 2018 at 12:34 AM, Michael Paquier wrote: > On Thu, Mar 08, 2018 at 11:04:20PM -0600, Jeremy Finzel wrote: > > Since you mention, can anyone elaborate further on the memory leak danger > > here? > > > > Line 193 in src/test/modules/worker_spi/worker_spi.c read: > > # Note some memor

Re: using worker_spi as pattern

2018-03-08 Thread Michael Paquier
On Thu, Mar 08, 2018 at 11:04:20PM -0600, Jeremy Finzel wrote: > Since you mention, can anyone elaborate further on the memory leak danger > here? > > Line 193 in src/test/modules/worker_spi/worker_spi.c read: > # Note some memory might be leaked here. > > Is this any reason *not *to use this pat

Re: using worker_spi as pattern

2018-03-08 Thread Jeremy Finzel
> > If you look at the code of worker_spi.c closely the answer shows up by > itself: > > appendStringInfo(&buf, > "CREATE SCHEMA \"%s\" " > "CREATE TABLE \"%s\" (" > " type text CHECK (type IN ('total', > 'delta')), " >

Re: using worker_spi as pattern

2018-03-08 Thread Michael Paquier
On Thu, Mar 08, 2018 at 03:29:52PM -0600, Jeremy Finzel wrote: > However, this raises many questions for me: > >- Insert a value into what table? I see the process referring to an >object that doesn't exist in my database - schema1.counted >- What is "total" type? I don't see any typ