From: | "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com> |
---|---|
To: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | create c function with void argument bug? |
Date: | 2010-10-23 19:47:01 |
Message-ID: | 10833AA4-CA2F-4B4B-A149-56DD0B3D15CD@themactionfaction.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello,
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;
Two functions are created.
test=# \df
List of functions
Schema | Name | Result data type | Argument data types | Type
--------+------------------+------------------+---------------------+--------
public | test_fsync_speed | double precision | | normal
public | test_fsync_speed | double precision | void | normal
Furthermore, I can't figure out how to call the "void" argument variant. Why is void accepted as an argument?
create function testvoid(void) returns void as '' LANGUAGE PLPGSQL;
ERROR: PL/pgSQL functions cannot accept type void
I punched the void argument in just by chance- am I just stupid?
Cheers,
M
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2010-10-23 20:17:43 | Re: xlog.c: WALInsertLock vs. WALWriteLock |
Previous Message | Josh Berkus | 2010-10-23 19:01:21 | Re: GIN vs. Partial Indexes |