From: | apb18(at)cornell(dot)edu |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Detoasting and memory usage |
Date: | 2003-07-21 14:50:45 |
Message-ID: | Pine.SOL.3.91.1030721103341.21079U@travelers.mail.cornell.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hmm.. I can't believe I missed that. While that exact macro wouldn't
apply in my situation (because I fetch the value from a field in a tuple and
not the argument of a function), the underlying concept is the same as
what I would need. Now I do not need to feel the wrath of unnecessary
memory allocation/deallocation for the non-toasted case. Excellent.
Thanks very much!
-Aaron
> #define PG_FREE_IF_COPY(ptr,n) \
> do { \
> if ((Pointer) (ptr) != PG_GETARG_POINTER(n)) \
> pfree(ptr); \
> } while (0)
>
> Maybe you can use that or do something similar?
>
> HTH,
>
> Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2003-07-21 16:01:12 | Re: Fw: Is SQL silly as an RDBMS<->app interface? |
Previous Message | Tom Lane | 2003-07-21 14:41:01 | Re: Checkpoint question |