Re: I think that my data is saved correctly, but when printingagain, other data appears - Mailing list pgsql-general

From Laurenz Albe
Subject Re: I think that my data is saved correctly, but when printingagain, other data appears
Date
Msg-id 100bd8eb2dbacb96421549f65633a7cea7c50f8c.camel@cybertec.at
Whole thread Raw
In response to Re: I think that my data is saved correctly, but when printing again,other data appears  (Yessica Brinkmann <yessica.brinkmann@gmail.com>)
List pgsql-general
On Fri, 2019-10-25 at 22:06 -0300, Yessica Brinkmann wrote:
> What I do not understand well is how to use CurrentMemoryContext and MemoryContextStrdup

For examples using memotry contexts, search the PostgreSQL source code.

To make memory management easier and safer, PostgreSQL has implemented
its own memory management using "memory contexts".

If you allocate memoty with "palloc", "pstrdup" and similar, that memory
is allocated in the current memory context.  If the memory context is
reset or dropped, the memory is gone.

MemoryContextStrdup enables you to create a copy of a string in an
explicitly specified memory context.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Installation problem.
Next
From: stan
Date:
Subject: SQL pretty pritner?