pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andre_Mikulec <Andre_Mikulec@Hotmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: Bug: x86_64-w64-mingw32 REL_11_STABLE with features: UpdateStatisticsForTypeChange internal compiler error
Date: Wed, 5 Sep 2018 12:12:19 -0700 (MST)
Message-ID: <1536174739741-0.post@n3.nabble.com> (raw)
In-Reply-To: <943.1536170035@sss.pgh.pa.us>
References: <BYAPR15MB22160A7A3E99229734CB97BA9C020@BYAPR15MB2216.namprd15.prod.outlook.com>
	<943.1536170035@sss.pgh.pa.us>

It is an up-to-date compiler.

AnonymousUser@ANONYMOUST MINGW64 /w/R-3.5._/postgres/build
$  x86_64-w64-mingw32-gcc --version
x86_64-w64-mingw32-gcc.exe (Rev1, Built by MSYS2 project) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

These people here do not think that "a missing return statement" is a good
idea.

Why and how does GCC compile a function with a missing return statement?
https://stackoverflow.com/questions/7280877/why-and-how-does-gcc-compile-a-function-with-a-missing-r...

"
The subtraction of 32 was carried out in the %eax register. 
And in the x86 calling convention, that is the register in which 
the return value is expected to be! So... you got lucky.
"

Of
$ view /w/R-3.5._/postgres/src/backend/commands/statscmds.c

Here is the function.

419 void
420 UpdateStatisticsForTypeChange(Oid statsOid, Oid relationOid, int attnum,
421                                                           Oid
oldColumnType, Oid newColumnType)
422 {
423         /*
424          * Currently, we don't actually need to do anything here.  For
both
425          * ndistinct and functional-dependencies stats, the on-disk
representation
426          * is independent of the source column data types, and it is
plausible to
427          * assume that the old statistic values will still be good for
the new
428          * column contents.  (Obviously, if the ALTER COLUMN TYPE has a
USING
429          * expression that substantially alters the semantic meaning of
the column
430          * values, this assumption could fail.  But that seems like a
corner case
431          * that doesn't justify zapping the stats in common cases.)
432          *
433          * Future types of extended stats will likely require us to work
harder.
434          */
435 }  <---------- **  The error is here at line 435 and position 1. ** 






--
Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html




view thread (8+ messages)  latest in thread

Message-ID: <1536174739741-0.post@n3.nabble.com>
Permalink:  ../1536174739741-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1536174739741-0.post@n3.nabble.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: Andre_Mikulec@Hotmail.com
  Subject: Re: Bug: x86_64-w64-mingw32 REL_11_STABLE with features: UpdateStatisticsForTypeChange internal compiler error
  In-Reply-To: <1536174739741-0.post@n3.nabble.com>
  References: <BYAPR15MB22160A7A3E99229734CB97BA9C020@BYAPR15MB2216.namprd15.prod.outlook.com> <943.1536170035@sss.pgh.pa.us> <1536174739741-0.post@n3.nabble.com>

* 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