The problem reported by Rushabh Lathia boils down to the fact that contrib/isn intends to define a datatype that is represented "just like int8", but it supposes that int8 must be pass by reference. There is not anything wrong with the C code; the problem is the CREATE TYPE command in isn.sql. To fix this we need some way of passing the state of FLOAT8PASSBYVAL into that SQL script.
It seems reasonably likely that isn.sql isn't going to be the only place with such a problem, either. What I propose doing about this is to extend pgxs.mk's rule %.sql: %.sql.in sed 's,MODULE_PATHNAME,$$libdir/$*,g' $< >$@ endif to also be prepared to replace "FLOAT8PASSBYVAL" with either "PASSEDBYVALUE," (note the comma) or empty as appropriate. Likewise for FLOAT4PASSBYVAL. This will allow construction of CREATE TYPE commands that properly reflect the attributes of the various float and int64 types. This is kinda ugly but I don't really see anything better. Comments? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers