Re: [HACKERS] Binary data type with other output method

2007-12-25 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: I think all you need to do it this: Take the code for boolout() in src/backend/utils/adt/bool.c, adjust it and and make it a new function boolout2. Use pgxs to make it a loadable module. Then load it and adjust the catalog entry f

Re: [HACKERS] Binary data type with other output method

2007-12-25 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > I think all you need to do it this: > Take the code for boolout() in src/backend/utils/adt/bool.c, adjust it > and and make it a new function boolout2. Use pgxs to make it a loadable > module. > Then load it and adjust the catalog entry for the bool ty

Re: [HACKERS] Binary data type with other output method

2007-12-25 Thread Andrew Dunstan
Andreas 'ads' Scherbaum wrote: Hello, On Tue, 25 Dec 2007 11:10:25 -0500 Andrew Dunstan wrote: Andreas 'ads' Scherbaum wrote: i'm in the need to create a boolean datatype which returns an integer instead of the usual 't'/'f'. Before anyone starts to point me at casts: it's a lot ove

Re: [HACKERS] Binary data type with other output method

2007-12-25 Thread Andreas 'ads' Scherbaum
Hello, On Tue, 25 Dec 2007 22:12:23 +0500 imad wrote: > Why dont you provide a cast, I dont see an overhead in typbyval datatypes. I already have a cast from my type to PGs internal boolean ... or what do you mean? Kind regards -- Andreas 'ads' Scherbaum Germ

Re: [HACKERS] Binary data type with other output method

2007-12-25 Thread Andreas 'ads' Scherbaum
Hello, On Tue, 25 Dec 2007 11:10:25 -0500 Andrew Dunstan wrote: > Andreas 'ads' Scherbaum wrote: > > > > i'm in the need to create a boolean datatype which returns an integer > > instead of the usual 't'/'f'. Before anyone starts to point me at > > casts: it's a lot overhead to cast some hundred

Re: [HACKERS] Proposal for Null Bitmap Optimization(for TrailingNULLs)

2007-12-25 Thread Gokulakannan Somasundaram
Hi, Back from the holiday times. I have tried to present the proof, that the null bitmap was absent in the table with the trailing nulls. On Dec 22, 2007 4:43 AM, Decibel! <[EMAIL PROTECTED]> wrote: > On Dec 20, 2007, at 2:36 AM, Gokulakannan Somasundaram wrote: > > I checked it by creating a

Re: [HACKERS] Binary data type with other output method

2007-12-25 Thread imad
If you reduce your code you will have to leverage the bool data type. Why dont you provide a cast, I dont see an overhead in typbyval datatypes. On Dec 25, 2007 9:10 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > > Andreas 'ads' Scherbaum wrote: > > Hello all, > > > > i'm in the need to creat

Re: [HACKERS] timetz range check issue

2007-12-25 Thread Usama Dar
On Dec 22, 2007 7:40 PM, Andrew Chernow <[EMAIL PROTECTED]> wrote: > >Tom Lane wrote: > >>range-checks are present only where needed for the backend to defend > itself > > Survival is very important, but so is maintaining data integrity. IMHO, > data > validation should be as consistent as poss

Re: [HACKERS] Binary data type with other output method

2007-12-25 Thread Andrew Dunstan
Andreas 'ads' Scherbaum wrote: Hello all, i'm in the need to create a boolean datatype which returns an integer instead of the usual 't'/'f'. Before anyone starts to point me at casts: it's a lot overhead to cast some hundred occurances beside the source of trouble, if you forget one. Do

[HACKERS] Binary data type with other output method

2007-12-25 Thread Andreas 'ads' Scherbaum
Hello all, i'm in the need to create a boolean datatype which returns an integer instead of the usual 't'/'f'. Before anyone starts to point me at casts: it's a lot overhead to cast some hundred occurances beside the source of trouble, if you forget one. And so i asked myself, if there is an eas