Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement

Поиск
Список
Период
Сортировка
От Jim Jones
Тема Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement
Дата
Msg-id 8a95ff30-daaf-48f7-8100-dbfb90baa6a3@uni-muenster.de
обсуждение исходный текст
Ответ на Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement  (Manni Wood <manni.wood@enterprisedb.com>)
Ответы Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement
Список pgsql-hackers

On 07/11/2025 02:27, Manni Wood wrote:
> Attached v7 fixes problems in tests due to whitespace.


Since get_tablespace_loc_string returns a palloc'd string, I guess you
could pfree it after the if block. The same applies for spcowner, since
you're calling GetUserNameFromId() with noerr = false.

For reference, see pg_get_indexdef_worker():

...
/*
 * If it has options, append "WITH (options)"
 */
str = flatten_reloptions(indexrelid);
if (str)
{
  appendStringInfo(&buf, " WITH (%s)", str);
  pfree(str);
}
...


Thanks

Best, Jim



В списке pgsql-hackers по дате отправления: