Re: some dead code in functioncmds.c - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: some dead code in functioncmds.c
Date
Msg-id 4AEAEF23.6080505@enterprisedb.com
Whole thread Raw
In response to some dead code in functioncmds.c  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: some dead code in functioncmds.c
List pgsql-hackers
Pavel Stehule wrote:
>     else
>     {
>         ereport(ERROR,
>                 (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
>                  errmsg("function result type must be specified")));
>         /* Alternative possibility: default to RETURNS VOID */
> 
> /* WHY FOLOWING LINES? */
>         prorettype = VOIDOID;
>         returnsSet = false;
>     }

To keep the compiler quiet about using the variables uninitialized. The
compiler doesn't know that ereport(ERROR) never returns.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: FTP/GIT/WWW server move
Next
From: Tom Lane
Date:
Subject: Re: CREATE TABLE ... INHERITS (parent INCLUDING xxx)