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

AW: Re: charin(), text_char() should return something else for empty input

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: AW: Re: charin(), text_char() should return something else for empty input
Date: 2001-05-29 08:02:02
Message-ID: 11C1E6749A55D411A9670001FA6879633682F9@sdexcsrv1.f000.d0188.sd.spardat.at (view raw or flat)
Thread:
Lists: pgsql-hackers
> An alternative approach is to make charin and text_char map empty
> strings to the null character (\0), and conversely make charout and
> char_text map the null character to empty strings.  charout already
> acts that way, in effect, since it has to produce a null-terminated
> This way would have the advantage that there would still
> be a reversible dump and reload representation for a "char" field
> containing '\0'

I more like this. IIRC some implementations allow storing a \0 in char(n) also.
Then it is 8bit clean and can be used for a 1 byte number. Such values
can usually only be inserted and selected with host variables.

Andreas

pgsql-hackers by date

Next:From: Larry RosenmanDate: 2001-05-29 10:11:15
Subject: /contrib/unixdate: Broke in cvs tip.
Previous:From: Zeugswetter Andreas SBDate: 2001-05-29 07:35:01
Subject: AW: AW: Plans for solving the VACUUM problem

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