Re: describe objects, as in pg_depend

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2010-11-18T19:20:34Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. has_table_privilege spawns scions has_database_privilege, has_function_privilege,

Alvaro Herrera <alvherre@commandprompt.com> writes:
> I just noticed that this is leaking a bit of memory, because we call
> getObjectDescription (which pallocs its result) and then
> cstring_to_text which pallocs a copy.  This is not a lot and it's not
> going to live much anyway, is it worrying about?

No.  The extra string will go away at the end of the tuple cycle.
I don't think it's a particularly good idea for this code to assume
that getObjectDescription's result is freeable, anyway.

			regards, tom lane