Received: from femail40.sdc1.sfba.home.com (femail40.sdc1.sfba.home.com [24.254.60.34]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fALHBwm47258 for ; Wed, 21 Nov 2001 12:11:58 -0500 (EST) (envelope-from joseph.conway@home.com) Received: from home.com ([24.0.42.111]) by femail40.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011121171202.GHAH13383.femail40.sdc1.sfba.home.com@home.com>; Wed, 21 Nov 2001 09:12:02 -0800 Message-ID: <3BFBE06D.3010103@home.com> Date: Wed, 21 Nov 2001 09:12:13 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6) Gecko/20011116 X-Accept-Language: en-us MIME-Version: 1.0 To: Ezra Epstein CC: pgsql-docs@postgresql.org Subject: Re: Oracle -> PostgreSQL ==> RAW -> ??? References: <200111211532.fALFW4721515@spidey.speakeasy.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200111/61 X-Sequence-Number: 1134 Ezra Epstein wrote: > Hi, > > I'm moving a database from Oracle to PostgreSQL. I use RAW (as in > BINARY, as in BYTE(x) where x < 20) for quite a few columns that > hold application generated keys, etc. > > How do I represent a RAW in PostgreSQL. I'm too much of a newbie to > know how to create my own type. BIT seems to be wrong. And BYTEA > can't be it either as there are all sorts of restrictions on using > BYTEAs for keys. Seems OIDs are for BLOBs and this are not large > binary objects... > > HELP!!! Answers, pointers, tips, doc refs, anything. Most of the BYTEA restrictions are gone in 7.2 (about to go into 3rd beta release). Specifically, you can now create btree indexes on BYTEA columns. There's documentation too, in CVS and starting with beta3. Look for "Binary Strings" under the section on datatypes and functions. Hope this helps, Joe