Re: [GENERAL] Returning bigint from C extension

2009-11-23 Thread Martijn van Oosterhout
On Mon, Nov 23, 2009 at 09:58:21AM +0200, Jason Armstrong wrote: > How can I return a bigint value from a C extension function? > > I have a table with a bytea column: > > CREATE TABLE mydata(data bytea); > > I would like to select and index based on a subset of the data: > > CREATE FUNCTION ge

[GENERAL] Returning bigint from C extension

2009-11-22 Thread Jason Armstrong
How can I return a bigint value from a C extension function? I have a table with a bytea column: CREATE TABLE mydata(data bytea); I would like to select and index based on a subset of the data: CREATE FUNCTION get_key(bytea) returns BIGINT AS '/lib/data.so' LANGUAGE C IMMUTABLE; CREATE INDEX my