Re: Small syntax error in fmgr.h

Lists: pgsql-bugs
From: Martin Pitt <mpitt(at)debian(dot)org>
To: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Small syntax error in fmgr.h
Date: 2009-10-29 14:13:21
Message-ID: 20091029141321.GE2438@piware.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Hello PostgreSQL developers,

https://launchpad.net/bugs/458020 reports a small syntax error in
./src/include/fmgr.h:338:

extern int no_such_variable

The trailing semicolon is missing:

"I had to make the changes in the attached patch file in order to use
the PG_MODULE_MAGIC macro.

From a quick scan it looks as though there may also be a similar
problem with PG_FUNCTION_INFO_V1 also on line 329.
"

Thanks,

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Pitt <mpitt(at)debian(dot)org>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Small syntax error in fmgr.h
Date: 2009-10-29 14:36:25
Message-ID: 5345.1256826985@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Martin Pitt <mpitt(at)debian(dot)org> writes:
> https://launchpad.net/bugs/458020 reports a small syntax error in
> ./src/include/fmgr.h:338:

> extern int no_such_variable

> The trailing semicolon is missing:

This is not a bug. You are supposed to write a semicolon after the
call of PG_MODULE_MAGIC. If we put a semicolon into the macro value,
it would break every single correct usage (at least under compilers
that are picky about empty statements outside functions).

The same goes for PG_FUNCTION_INFO_V1.

regards, tom lane


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Small syntax error in fmgr.h
Date: 2009-10-29 14:36:51
Message-ID: 20091029143651.GA5413@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Martin Pitt wrote:
> Hello PostgreSQL developers,
>
> https://launchpad.net/bugs/458020 reports a small syntax error in
> ./src/include/fmgr.h:338:
>
> extern int no_such_variable
>
> The trailing semicolon is missing:

The guy forgot to add a trailing semicolon on the line where he uses the
macro. This is not our bug.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.