Re: C function accepting/returning cstring vs. text - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: C function accepting/returning cstring vs. text
Date
Msg-id 4B605DB3.6050807@enterprisedb.com
Whole thread Raw
In response to Re: C function accepting/returning cstring vs. text  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Responses Re: C function accepting/returning cstring vs. text  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
List pgsql-hackers
Ivan Sergio Borgonovo wrote:
> I'm more interested in understanding when I should use materialized
> mode.
> eg. I should be more concerned about memory or cpu cycles and what
> should be taken as a reference to consider memory needs "large"?
> If for example I was going to split a large TEXT into a set of
> record (let's say I'm processing csv that has been loaded into a
> text field)... I'd consider the CPU use "light" but the memory needs
> "large". Would be this task suited for the materialized mode?

Currently, there's no difference in terms of memory needs. The backend
always materializes the result of a SRF into a tuplestore anyway, if the
function didn't do it itself. There has been discussion of optimizing
away that materialization step, but no-one has come up with an
acceptable patch for that yet.

There probably isn't much difference in CPU usage either.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: C function accepting/returning cstring vs. text
Next
From: Andrew Dunstan
Date:
Subject: make everything target