Re: create c function with void argument bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: create c function with void argument bug?
Date: 2010-10-23 23:32:03
Message-ID: 10858.1287876723@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"A.M." <agentm(at)themactionfaction(dot)com> writes:
> It seems that this:
> CREATE OR REPLACE FUNCTION test_fsync_speed() RETURNS float AS '$libdir/test_fsync_speed','\
> test_fsync_speed' LANGUAGE C IMMUTABLE STRICT;

> is not equivalent to this (note "void" argument):

> CREATE OR REPLACE FUNCTION test_fsync_speed(void) RETURNS float AS '$libdir/test_fsync_speed','\
> test_fsync_speed' LANGUAGE C IMMUTABLE STRICT;

Why would you think it would be? "void" in SQL doesn't act the same way
as "void" in C, it's an actual type.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-23 23:33:32 Re: WIP: extensible enums
Previous Message Tom Lane 2010-10-23 23:29:14 Re: WIP: extensible enums