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

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-10-23 23:33:32
Subject: Re: WIP: extensible enums
Previous:From: Tom LaneDate: 2010-10-23 23:29:14
Subject: Re: WIP: extensible enums

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