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

Re: PQfformat() and Composite Formatted Results

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PQfformat() and Composite Formatted Results
Date: 2006-02-03 18:55:57
Message-ID: 200602031855.k13Itvl29407@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Your patch has been added to the PostgreSQL unapplied patches list at:

	http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

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


Volkan YAZICI wrote:
> Hi,
> 
> I've prepared a patch[1] which makes it possible to use composite formats
> in query results.
> 
> It defines
> 
>   PQexecParams()
>   PQexecPrepared()
>   PQsendQueryParams()
>   PQsendPrepared()
> 
> functions with last
> 
>   int resultFormat
> 
> parameter replaced with
> 
>   int       nResFormat,
>   const int resParamFormats
> 
> Therefore, it breaks compatibility with the existing PQ*Params() and
> PQ*Prepared() functions. (Use at your own risk.)
> 
> There's also a test case[2] too
> 
> [1] http://www.students.itu.edu.tr/~yazicivo/libpq_res_fmt.patch
> [2] http://www.students.itu.edu.tr/~yazicivo/pg_res_fmt.c
> 
> 
> Any comments will be appreciated.
> Regards.
> 
> 
> On Dec 30 06:52, Tom Lane wrote:
> > It's not a protocol restriction, it's a libpq restriction made in the
> > name of keeping the API from getting too unwieldy.  We could add more
> > entry points with different parameter lists to address this.  I have
> > a feeling that refactoring the API of the query functions entirely
> > might be a better idea, though.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-interfaces by date

Next:From: Tom LaneDate: 2006-02-03 21:12:34
Subject: Re: PQfformat() and Composite Formatted Results
Previous:From: Bruce MomjianDate: 2006-02-03 03:55:23
Subject: Re: [BUGS] BUG #2171: Differences compiling plpgsql in ecpg

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