Skip site navigation (1) Skip section navigation (2)

Re: some dead code in functioncmds.c

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: some dead code in functioncmds.c
Date: 2009-10-30 13:50:27
Message-ID: 4AEAEF23.6080505@enterprisedb.com (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-10-30 14:02:11
Subject: Re: CREATE TABLE ... INHERITS (parent INCLUDING xxx)
Previous:From: Dave PageDate: 2009-10-30 13:28:44
Subject: Re: FTP/GIT/WWW server move

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group