Re: Custom Data Type Question

From: Greg Mitchell <gmitchell(at)atdesk(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Custom Data Type Question
Date: 2006-11-16 18:03:31
Message-ID: 455CA7F3.5080106@atdesk.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

As far as memory management goes, do I just use hash_create() and assign
that pointer to fn_extra and at the end of the query it will be freed?
Or will it not be freed until this end of the transaction? I'm really
having trouble understanding the memory management issues with Postgres.

Greg

Andrew Dunstan wrote:
> Greg Mitchell wrote:
>>
>>
>>
>> Also, are there any ADTs like a hash-map or tree-map in the server
>> libraries (my background is C++ and am use to having std::map<>) or do I
>> need to role my own?
>>
>>
>
> Look at the dynahash code. I just used it for the first time in a plperl
> patch, and it's reasonably straightforward.
>
> cheers
>
> andrew
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-11-16 18:35:04 Re: replication docs: split single vs. multi-master
Previous Message Tom Lane 2006-11-16 17:42:34 Re: Segmentation fault with HEAD.