nRe: [PATCH v1] Show whether tables are logged in \dt+

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема nRe: [PATCH v1] Show whether tables are logged in \dt+
Дата
Msg-id alpine.DEB.2.21.1904270844180.29865@lancre
обсуждение исходный текст
Ответ на Re: [PATCH v1] Show whether tables are logged in \dt+  (David Fetter <david@fetter.org>)
Ответы Re: nRe: [PATCH v1] Show whether tables are logged in \dt+  (David Fetter <david@fetter.org>)
Список pgsql-hackers
Hello David,

Patch v3 applies, but compiles for me with a warning because the 
indentation of the following size block has been changed:

describe.c: In function ‘listTables’:
describe.c:3705:7: warning: this ‘if’ clause does not guard... 
[-Wmisleading-indentation]
   else if (pset.sversion >= 80100)
        ^~
describe.c:3710:3: note: ...this statement, but the latter is misleadingly 
indented as if it were guarded by the ‘if’
    appendPQExpBuffer(&buf,
    ^~~~~~~~~~~~~~~~~

Make check fails because of my temp schema was numbered 4 instead of 3, 
and I'm "fabien" rather than "shackle".

>>>>> Included, but they're not stable for temp tables. I'm a little stumped
>>>>> as to how to either stabilize them or test some other way.
>>>>
>>>> Hmmm. First there is the username which appears, so there should be a
>>>> dedicated user for the test.
>>>>
>>>> I'm unsure how to work around the temporary schema number, which is
>>>> undeterministic with parallel execution it. I'm afraid the only viable
>>>> approach is not to show temporary tables, too bad:-(

The tests have not been fixed.

I think that they need a dedicated user to replace "shackle", and I'm 
afraid that there temporary test schema instability cannot be easily fixed 
at the "psql" level, but would require some kind of TAP tests instead if 
it is to be checked. In the short term, do not.

I checked that the \di+ works, though. I've played with temporary views 
and \dv as well.

I discovered that you cannot have temporary unlogged objects, nor 
temporary or unlogged materialized views. Intuitively I'd have thought 
that these features would be orthogonal, but they are not. Also I created 
an unlogged table with a SERIAL which created a sequence. The table is 
unlogged but the sequence is permanent, which is probably ok.

I only have packages down to pg 9.3, so I could not test prior 9.1. By 
looking at the online documentation, is seems that relistemp appears in pg 
8.4, so the corresponding extraction should be guarded by this version. 
Before that, temporary objects existed but were identified indirectly, 
possibly because they were stored in a temporary schema. I suggest not to 
try to address cases prior 8.4.

-- 
Fabien.

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: clean up docs for v12
Следующее
От: Peter Eisentraut
Дата:
Сообщение: generate documentation keywords table automatically