Re: Re[2]: [BUGS] BUG #11761: range_in dosn't work via direct functional call

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dunauskas Oleg <olegjobs(at)mail(dot)ru>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org <pgsql-bugs(at)postgresql(dot)org>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: Re[2]: [BUGS] BUG #11761: range_in dosn't work via direct functional call
Date: 2014-10-25 15:57:25
Message-ID: 6758.1414252645@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?UTF-8?B?RHVuYXVza2FzIE9sZWc=?= <olegjobs(at)mail(dot)ru> writes:
> And one more question, for example, I do some memory allocation via palloc in _PG_Init().
> Is this memory preserve for all life time after library is loaded into postgresql process?

Probably not --- CurrentMemoryContext would most likely be pointing at a
statement-lifespan context. If you want that behavior, I'd recommend
explicitly allocating in TopMemoryContext.

(Also, you would not be needing to ask that question if you were using
an --enable-cassert build for testing. Which is *highly* recommended
when developing C code for Postgres.)

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2014-10-25 20:11:20 tsquery @> operator bugs
Previous Message Tom Lane 2014-10-24 22:36:47 Re: BUG #11617: issue with dump/restore involving view with hstore data type embedded in where condition