Re: [PATCHES] large object regression tests

From: Jeremy Drake <psql(at)jdrake(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] large object regression tests
Date: 2006-09-25 22:19:19
Message-ID: Pine.BSO.4.64.0609251511030.16532@resin.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Mon, 25 Sep 2006, Tom Lane wrote:

> Jeremy Drake <psql(at)jdrake(dot)com> writes:
> > I just tried using the \lo_import command in a regression test, and I
> > think I figured out why this will not work:
> > ...
> > Yes, that's the large object OID in the output there, and it is different
> > each run (as I expect).
>
> Right. I'd suggest temporarily setting ECHO off to hide the
> unpredictable part of the output. There are similar measures taken in
> many of the contrib tests.

I tried this:
jeremyd=# \set QUIET
jeremyd=# \set ECHO off
jeremyd=# BEGIN;
jeremyd=# \lo_import results/lotest.txt
lo_import 84951
jeremyd=# ROLLBACK;

From what I could tell in the code, the message is printed regardless of
setting.

It looks like the large_obj.c output is missing much of the output
settings handling which is in the PrintQueryStatus function in common.c,
such as handling quiet mode, and html output. I will try to dig around
and try to put together a patch to make it respect the settings like other
commands...

--
"You are old," said the youth, "and your programs don't run,
And there isn't one language you like;
Yet of useful suggestions for help you have none --
Have you thought about taking a hike?"

"Since I never write programs," his father replied,
"Every language looks equally bad;
Yet the people keep paying to read all my books
And don't realize that they've been had."

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-09-25 22:36:10 Re: Please to technical check of upcoming release
Previous Message Josh Berkus 2006-09-25 21:03:37 Please to technical check of upcoming release

Browse pgsql-patches by date

  From Date Subject
Next Message Jeremy Drake 2006-09-25 23:16:37 Re: [HACKERS] large object regression tests
Previous Message Jim C. Nasby 2006-09-25 18:39:02 Re: Questions about guc units