Re: Libpq support for precision and scale

From: Fernando Nasser <fnasser(at)redhat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Fernando Nasser <fnasser(at)cygnus(dot)com>, pgsql-hackers(at)postgresql(dot)org, Liam Stewart <liams(at)cygnus(dot)com>
Subject: Re: Libpq support for precision and scale
Date: 2002-03-08 02:02:25
Message-ID: 3C881BB1.78D198B2@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
>
> Fernando Nasser <fnasser(at)redhat(dot)com> writes:
> > We have agreed to add another call to set a flag for including the
> > metadata on the PQexec call (which would make it work like the
> > PQexecIncludeMetadata described above). It will be in the REPOST patch.
>
> That works for me. Among other things, it solves the problem where the
> code that wants the metadata is a layer or two above the place that's
> actually issuing PQexec. Setting a persistent option in the PGconn
> object gets around the difficulty that the caller of PQexec may not know
> metadata will be wanted later.
>
> > Question: should it affect only the next PQexec(), or should we require
> > the user to reset it?
>
> It should be persistent till reset, see above.
>

Agreed.

> > An even worse problem is that
> > it'll fail entirely with a multi-query query string.
>
> I'm still quite unhappy about this; it more or less destroys the layer
> independence mentioned above. Please think harder. Perhaps it could
> be set up so that metadata is only collected for the last result of a
> query string, after you determine that there are no more results?
> Which is still not great, but better than failing outright with
> multi-query strings.
>

I will look into doing like you suggest.

--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-03-08 02:02:35 Re: TODO question
Previous Message Tatsuo Ishii 2002-03-08 02:00:33 Re: point in time recovery and moving datafiles online