Re: Incorrect comment in fe-lobj.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Incorrect comment in fe-lobj.c
Date: 2012-08-27 01:42:49
Message-ID: 14821.1346031769@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
> I found following in fe-lobj.c:

> * currently, only L_SET is a legal value for whence

> I don't know where "L_SET" comes from.

Hmm, seems to be that way in the original commit to our CVS (Postgres95).
I don't find this code at all in Postgres v4r2 though.

> Anyway this should be:
> * whence must be one of SEEK_SET, SEEK_CUR or SEEK_END.

Agreed. But looking at this brings a thought to mind: our code is
assuming that SEEK_SET, SEEK_CUR, SEEK_END have identical values on the
client and server. The lack of complaints over the past fifteen years
suggests that every Unix-oid platform is in fact using the same values
for these macros ... but that seems kind of a risky assumption. Is it
worth changing? And if so, how would we go about that?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2012-08-27 01:57:14 Re: Incorrect comment in fe-lobj.c
Previous Message Tom Lane 2012-08-27 01:28:03 Re: 64-bit API for large object