Re: [GENERAL] User defined data type

2006-04-05 Thread Don Y
Tom Lane wrote: Don Y <[EMAIL PROTECTED]> writes: Yeah, I was hoping someone would have built a template for new types that trimmed everything down to a single page/file instead of having to snoop the source tree. :-( The various new types in contrib/ are there in part to serve as models. Y

Re: [GENERAL] User defined data type

2006-04-05 Thread Tom Lane
Don Y <[EMAIL PROTECTED]> writes: > Yeah, I was hoping someone would have built a template for > new types that trimmed everything down to a single page/file > instead of having to snoop the source tree. :-( The various new types in contrib/ are there in part to serve as models. You could also lo

Re: [GENERAL] User defined data type

2006-04-04 Thread Don Y
Tom Lane wrote: Martijn van Oosterhout writes: On Thu, Mar 30, 2006 at 11:51:41AM -0700, Don Y wrote: - Can *_in() be ever invoked with a NULL argument? Or, can I safely assume that the pointer I am passed is valid? You can't get a NULL there. Yes, the pointer is valid cstring. Yes, STRI

Re: [GENERAL] User defined data type

2006-04-04 Thread Don Y
Martijn van Oosterhout wrote: On Thu, Mar 30, 2006 at 11:51:41AM -0700, Don Y wrote: [snipped questions and answers] Thanks! - Wish list item: errdetail(va_list arg) et al. functions (Yeah, I can write my own... but it would be nice if this was part of the error reporting routines). C

Re: [GENERAL] User defined data type

2006-03-30 Thread Tom Lane
Martijn van Oosterhout writes: > On Thu, Mar 30, 2006 at 11:51:41AM -0700, Don Y wrote: >> - Can *_in() be ever invoked with a NULL argument? Or, can I >> safely assume that the pointer I am passed is valid? > You can't get a NULL there. Yes, the pointer is valid cstring. To be sure about that,

Re: [GENERAL] User defined data type

2006-03-30 Thread Martijn van Oosterhout
On Thu, Mar 30, 2006 at 11:51:41AM -0700, Don Y wrote: > - I assume I don't have to check the return value from > palloc()? (All of the src/backend/utils datatypes > seem to trust it implicitly) BTW, where is the interface > to palloc() et al. documented (or, is it a case of "Use > the So