pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ranier Vilela <ranier.vf@gmail.com>
Cc: Manuel Weitzman <manuelweitzman@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Jeremy Schneider <schnjere@amazon.com>
Cc: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: Planning performance problem (67626.278ms)
Date: Sun, 20 Jun 2021 20:17:31 -0400
Message-ID: <1588548.1624234651@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEudQApVF7TX-EJXwBz4TUhH6NzNB-wXqhs4wj+qSe6Vw3H5-Q@mail.gmail.com>
References: <6d58f68e-ed1a-c48e-1440-691554f6e1e7@9livesdata.com>
	<CAFj8pRDDnOVNcU7dx4+oKH0x4-DsmL3XRWppQ8Cf5wwJ=G2fPg@mail.gmail.com>
	<20190408144210.GG10080@telsasoft.com>
	<b145b428-3351-ec86-d522-100a5bf8ded7@amazon.com>
	<20190408232644.r6xixkeulsmomwfj@alap3.anarazel.de>
	<3f5e5673-06aa-bf7c-cdb7-0e053c45ba26@amazon.com>
	<CAApHDvq9o1J45is6w-3Gv1UgtuDQ4eQP4UhFPQSnQmEH_EijvQ@mail.gmail.com>
	<767433.1619015825@sss.pgh.pa.us>
	<EFE95962-F088-45E2-BD13-AA5012829A69@gmail.com>
	<F06D0C00-DE75-4688-98B0-85A46E8F312C@gmail.com>
	<CAEudQApVF7TX-EJXwBz4TUhH6NzNB-wXqhs4wj+qSe6Vw3H5-Q@mail.gmail.com>

Ranier Vilela <ranier.vf@gmail.com> writes:
> 3. Avoid use of type *long*, it is very problematic with 64 bits.
> Windows 64 bits, long is 4 (four) bytes.
> Linux 64 bits, long is 8 (eight) bytes.

Agreed.

> 4. Avoid C99 style declarations
>     for(unsigned long i = 0;)
> Prefer:
>    size_t i;
>    for(i = 0;)
> Helps backpatching to C89 versions.

It seems unlikely that we'd consider back-patching this into pre-C99
branches, so I see no reason not to use C99 loop style.  (But do
keep in mind that we avoid most other C99-isms, such as intermixed
decls and code.)

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <1588548.1624234651@sss.pgh.pa.us>
Permalink:  ../1588548.1624234651@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1588548.1624234651@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ranier.vf@gmail.com, manuelweitzman@gmail.com, dgrowleyml@gmail.com, schnjere@amazon.com, pgsql-performance@lists.postgresql.org, andres@anarazel.de
  Subject: Re: Planning performance problem (67626.278ms)
  In-Reply-To: <1588548.1624234651@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox