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

Re: type recv/send functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: type recv/send functions
Date: 2006-05-30 02:53:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Greg Stark <gsstark(at)mit(dot)edu> writes:
> Is it just me or are the send/recv strangely asymmetric?

Not all that much: they both return a meaningful result.  We cheated a
little bit by allowing the recv functions to modify the state of their
input argument, but they still deliver a valid result object.

> Wouldn't the natural thing to do be to provide the StringInfo buffer with a
> cursor for the type's send function to stuff the bytea into?

Then the send function would return void, which is surely not more
natural.  Also, there would be a much larger disparity between the
behaviors of the text and binary output paths.

Anyway it's about three years too late to be debating this ;-)

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-05-30 03:12:41
Subject: Re: Altering view ownership doesn't work ...
Previous:From: Bruce MomjianDate: 2006-05-30 02:47:40
Subject: pg_resetxlog -f flag

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