Re: I think that my data is saved correctly, but when printing again, other data appears

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Yessica Brinkmann <yessica(dot)brinkmann(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: I think that my data is saved correctly, but when printing again, other data appears
Date: 2019-10-27 21:38:57
Message-ID: 100bd8eb2dbacb96421549f65633a7cea7c50f8c.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message stan 2019-10-27 22:21:48 SQL pretty pritner?
Previous Message Laurenz Albe 2019-10-27 21:32:33 Re: Installation problem.