agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Andy Fan <zhihuifan1213@163.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Make printtup a bit faster
Date: Sun, 03 May 2026 22:41:27 +0800
Message-ID: <877bpk7dyg.fsf@163.com> (raw)
In-Reply-To: <CAApHDvqHthJb6baDhgTE5T4RLW6nEX=r239EYmpjfg=Wq5CqQA@mail.gmail.com>
References: <87wmjzfz0h.fsf@163.com>
	<CAApHDvrBNA-QRsbn-SJyRAsywjHCNenfcbi14c3O3c7=OimQ8Q@mail.gmail.com>
	<87bk1aj2go.fsf@163.com>
	<CAApHDvqHthJb6baDhgTE5T4RLW6nEX=r239EYmpjfg=Wq5CqQA@mail.gmail.com>


Hi David, 

> On Fri, 30 Aug 2024 at 12:10, Andy Fan <zhihuifan1213@163.com> wrote:
>> What would be the extra benefit we redesign all the out functions?
>
> If I've understood your proposal correctly, it sounds like you want to
> invent a new "print" output function for each type to output the Datum
> onto a StringInfo, if that's the case, what would be the point of
> having both versions?

You understood me correctly and I thought we should maintain one version
two years ago, so I tried to implement this idea today.  The first issue I
want to talk about now how to define the function protocol in SQL, take
int4out for example:

master:  cstring int4out(integer);
New protocol:  void int4out(integer, internal).  and the internal is
StringInfo acutally.

The direct impaction would be:

master support:
postgres=# select int4out(8);
 int4out 
---------
 8
(1 row)

After our change, user could not invoke any {type}out function anymore
in SQL since it takes 'internal' as an agrument. I am not sure if people
would write SQL like this, but it'd be good to have a talk about this. 


-- 
Best Regards
Andy Fan






view thread (24+ messages)  latest in thread

Message-ID: <877bpk7dyg.fsf@163.com>
Permalink:  ../877bpk7dyg.fsf@163.com/
Also on:    postgresql.org/message-id/877bpk7dyg.fsf@163.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: zhihuifan1213@163.com, dgrowleyml@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Make printtup a bit faster
  In-Reply-To: <877bpk7dyg.fsf@163.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox