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

Hex literals

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>,Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Hex literals
Date: 2002-07-30 15:33:14
Message-ID: 3D46B1BA.4CCD39E9@fourpalms.org (view raw or flat)
Thread:
Lists: pgsql-hackers
I've got patches to adjust the interpretation of hex literals from an
integer type (which is how I implemented it years ago to support the
*syntax*) to a bit string type. I've mentioned this in a previous
thread, and am following up now.

One point raised previously is that the spec may not be clear about the
correct type assignment for a hex constant. I believe that the spec is
clear on this (well, not really, but as clear as SQL99 manages to get ;)
and that the correct assignment is to bit string (as opposed to a large
object or some other alternative).

I base this on at least one part of the standard, which is a clause in
the restrictions on the BIT feature (which we already support):

 31) Specifications for Feature F511, "BIT data type":
  a) Subclause 5.3, "<literal>":
   i) Without Feature F511, "BIT data type", a <general literal>
    shall not be a <bit string literal> or a <hex string
    literal>.

This seems to be a hard linkage of hex strings with the BIT type.

Comments or concerns?

                    - Thomas

Responses

pgsql-hackers by date

Next:From: Oleg BartunovDate: 2002-07-30 15:36:45
Subject: Re: Weird manual page
Previous:From: Bruce MomjianDate: 2002-07-30 15:30:49
Subject: Re: Why is MySQL more chosen over PostgreSQL?

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