Re: [HACKERS] Fixing contrib/isn for float8-pass-by-value

2008-11-28 Thread Peter Eisentraut
On Friday 28 November 2008 22:02:52 Tom Lane wrote: > I had a better but more invasive idea: invent a new attribute for > CREATE TYPE > > LIKE = typename > > which means "copy any unspecified representational details from the > given pre-existing type". This would allow the .sql file to k

Re: [HACKERS] Fixing contrib/isn for float8-pass-by-value

2008-11-28 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > I was going to say something like that but couldn't come up with a > nice syntax. The syntax you gave seems obvious in retrospect. Here's a draft patch for this. It actually works out pretty well -- the bulk of the diff is just to allow processing the CR

Re: [HACKERS] Fixing contrib/isn for float8-pass-by-value

2008-11-28 Thread Greg Stark
I was going to say something like that but couldn't come up with a nice syntax. The syntax you gave seems obvious in retrospect. I wonder if this should be tied in some way with creating binary- compatible casts or anything. Probably not since the data type can just make them itself. greg

Re: [HACKERS] Fixing contrib/isn for float8-pass-by-value

2008-11-28 Thread Tom Lane
I wrote: > 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 > comm

[HACKERS] Fixing contrib/isn for float8-pass-by-value

2008-11-28 Thread Tom Lane
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