Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Дата
Msg-id CAA4eK1K9h_bSV4_VOaw0ZA2G6WyWWEEks0a_cpDdEkOfduXuSA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
On Sat, Oct 19, 2019 at 9:14 PM Stephen Frost <sfrost@snowman.net> wrote:
>
> * Andres Freund (andres@anarazel.de) wrote:
>
> > Especially not when the person suggesting to do so isn't
> > even doing the leg work to estimate the portability issues.
>
> I figured it was common knowledge that gcc/clang supported it just fine,
> which covers something like 90% of the buildfarm.  I haven't got easy
> access to check others.
>

I have tried {} on Windows (MSVC-2017) and it is giving compilation error:

>\src\backend\access\transam\commit_ts.c(425): error C2059: syntax error: '}'
1>\src\backend\access\transam\commit_ts.c(426): error C2059: syntax error: '}'

The changed code looks like below:
Datum
pg_last_committed_xact(PG_FUNCTION_ARGS)
{
..
Datum values[2] = {};
bool nulls[2] = {};
..
}

Does this put an end to the option of using {} or do we want to
investigate something more?

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: Questions/Observations related to Gist vacuum
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: configure fails for perl check on CentOS8