Re: cosmetic patch to large object regression test

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Jeremy Drake <pgsql(at)jdrake(dot)com>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: cosmetic patch to large object regression test
Date: 2007-03-03 20:17:36
Message-ID: 200703032017.l23KHaF16407@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Patch applied. Thanks.

---------------------------------------------------------------------------

Jeremy Drake wrote:
> Since I have now learned that it is possible to input values in hex in
> postgres, I submit this patch to clean up the ugly workaround I did in the
> largeobject regression test to try to input hex values. It does not
> change the functionality of the test at all, it just makes it more
> readable.
>
> In detail, before when I needed to write hex values, for example
> 0x20000 | 0x40000,
> for the flags to lo_open, I would write it:
> CAST((2 | 4) * 16^4 AS integer)
>
> Now, I write it:
> CAST(x'20000' | x'40000' AS integer)
>
> which is more like the C and other language consumers of the API, and also
> is more obvious what I am trying to do, IMHO.
>
>
> --
> Real Programs don't use shared text. Otherwise, how can they use
> functions for scratch space after they are finished calling them?
Content-Description:

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Jeremy Drake 2007-03-03 22:48:43 Re: cosmetic patch to large object regression test
Previous Message Bruce Momjian 2007-03-03 20:13:08 Re: Split _bt_insertonpg to two functions