Skip site navigation (1) Skip section navigation (2)

Re: Binary data type with other output method

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Binary data type with other output method
Date: 2007-12-28 03:58:05
Message-ID: 4774744D.6060100@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers

Andreas 'ads' Scherbaum wrote:
> Andrew: your workaround was to create a domain which would use
> 0/1 ... this idea will not behave like a boolean, because it does not
> accept 'true'/'false'.
>
> My replacement boolean type does accept all this input values and does
> emit 0/1 instead of 'f'/'t'. But since i have to create all the casts,
> operators and classes (like for boolean) again for my data type, i asked
> if someone know a more elegant way ... if not, i will use my data type.
>
> You can see the code here:
>
> http://andreas.scherbaum.la/writings/boolean.sql
>
> This are some hundred lines of SQL which are almost doubled from the
> boolean type. So maybe there's a way to avoid all this, but i haven't
> found one.
>
>
>
>   

Looks to me like this is the way to meet you requirements.

cheers

andrew

In response to

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-12-28 04:14:38
Subject: Re: [HACKERS] Unworkable column delimiter characters for COPY
Previous:From: Tom LaneDate: 2007-12-27 23:54:15
Subject: Re: Archiver behavior at shutdown

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group