Simon Riggs wrote:
On Wed, 2006-11-15 at 16:38 -0500, Andrew Dunstan wrote:
My little enumkit tool allows you to create enumerations today very
easily, but its values are completely hardcoded. However, the above
trick still works. The downside is that each enumeration type requires a
tin
On Wed, 2006-11-15 at 16:38 -0500, Andrew Dunstan wrote:
> My little enumkit tool allows you to create enumerations today very
> easily, but its values are completely hardcoded. However, the above
> trick still works. The downside is that each enumeration type requires a
> tiny bit of compilati
Greg Mitchell <[EMAIL PROTECTED]> writes:
> 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
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 straig
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
A
A simpler way to do this might be to only cache the list per query
context. In your IO functions, you could whack a pointer to your cache
onto fcinfo->flinfo->fn_extra, and the same flinfo gets passed in for
e.g. all output function calls for that column for that query, IIRC.
This was what I had
Hi Greg
Greg Mitchell wrote:
I'm trying to create a custom data type similar to an enumeration type.
However, I'd like the mapping of the int<->string to be dynamic instead
of hard coded. I'd like to have a table that contains this mapping that
can be appended to. Creating this type is not ve
Greg Mitchell wrote:
I'm trying to create a custom data type similar to an enumeration
type. However, I'd like the mapping of the int<->string to be dynamic
instead of hard coded. I'd like to have a table that contains this
mapping that can be appended to. Creating this type is not very
diffic