From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dunauskas Oleg <olegjobs@mail.ru>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Subject: Re: Re[2]: [BUGS] BUG #11761: range_in dosn't work via direct functional call
Date: Sat, 25 Oct 2014 11:57:25 -0400
Message-ID: <6758.1414252645@sss.pgh.pa.us> (raw)
In-Reply-To: <1414171965.135034595@f243.i.mail.ru>
References: <20141022172703.2662.31056@wrigleys.postgresql.org>
<544A4F4E.9080407@vmware.com>
<CAFj8pRBnM_mMFe-h=Nta_Ch=K_cTdwgCgpChsaY_O=Uje_cpjg@mail.gmail.com>
<1414171965.135034595@f243.i.mail.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
=?UTF-8?B?RHVuYXVza2FzIE9sZWc=?= <olegjobs@mail.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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, olegjobs@mail.ru, pavel.stehule@gmail.com, hlinnakangas@vmware.com
Subject: Re: [BUGS] BUG #11761: range_in dosn't work via direct functional call
In-Reply-To: <6758.1414252645@sss.pgh.pa.us>
References: <20141022172703.2662.31056@wrigleys.postgresql.org> <544A4F4E.9080407@vmware.com> <CAFj8pRBnM_mMFe-h=Nta_Ch=K_cTdwgCgpChsaY_O=Uje_cpjg@mail.gmail.com> <1414171965.135034595@f243.i.mail.ru> <6758.1414252645@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox