Re: pg_stop_backup() v2 incorrectly marked as proretset

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: pg_stop_backup() v2 incorrectly marked as proretset
Дата
Msg-id CAJ7c6TO2rq3LTe_TsPgb8RWuAnxd-gs0qV7g6HACu21P9cTXEQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_stop_backup() v2 incorrectly marked as proretset  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pg_stop_backup() v2 incorrectly marked as proretset  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi Michael,

```
 Datum
 pg_stop_backup_v2(PG_FUNCTION_ARGS)
 {
-    ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
+#define PG_STOP_BACKUP_V2_COLS 3
     TupleDesc    tupdesc;
-    Tuplestorestate *tupstore;
-    MemoryContext per_query_ctx;
-    MemoryContext oldcontext;
-    Datum        values[3];
-    bool        nulls[3];
+    Datum        values[PG_STOP_BACKUP_V2_COLS];
+    bool        nulls[PG_STOP_BACKUP_V2_COLS];
```

Declaring a macro inside the procedure body is a bit unconventional.
Since it doesn't seem to be used for anything except these two array
declarations I suggest keeping simply "3" here.

-- 
Best regards,
Aleksander Alekseev



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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: psql: Make SSL info display more compact
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Handle infinite recursion in logical replication setup