Обсуждение: 'converts internal representation to "..."' comment is confusing

Поиск
Список
Период
Сортировка

'converts internal representation to "..."' comment is confusing

От
Steve Chavez
Дата:
Hello hackers,

I found "..." confusing in some comments, so this patch changes it to "cstring". Which seems to be the intention after all.

Best regards,
Steve
Вложения

Re: 'converts internal representation to "..."' comment is confusing

От
Tom Lane
Дата:
Steve Chavez <steve@supabase.io> writes:
> I found "..." confusing in some comments, so this patch changes it to
> "cstring". Which seems to be the intention after all.

Those comments are Berkeley-era, making them probably a decade older
than the "cstring" pseudotype (invented in b663f3443).  Perhaps what
you suggest is an improvement, but I'm not sure that appealing to
original intent can make the case.

            regards, tom lane



Re: 'converts internal representation to "..."' comment is confusing

От
Steve Chavez
Дата:
Thanks a lot for the clarification!

The "..." looks enigmatic right now. I think cstring would save newcomers some head-scratching.

Open to suggestions though.

Best regards,
Steve 

On Sun, 14 May 2023 at 22:36, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Steve Chavez <steve@supabase.io> writes:
> I found "..." confusing in some comments, so this patch changes it to
> "cstring". Which seems to be the intention after all.

Those comments are Berkeley-era, making them probably a decade older
than the "cstring" pseudotype (invented in b663f3443).  Perhaps what
you suggest is an improvement, but I'm not sure that appealing to
original intent can make the case.

                        regards, tom lane

Re: 'converts internal representation to "..."' comment is confusing

От
Robert Haas
Дата:
On Sun, May 14, 2023 at 9:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Steve Chavez <steve@supabase.io> writes:
> > I found "..." confusing in some comments, so this patch changes it to
> > "cstring". Which seems to be the intention after all.
>
> Those comments are Berkeley-era, making them probably a decade older
> than the "cstring" pseudotype (invented in b663f3443).  Perhaps what
> you suggest is an improvement, but I'm not sure that appealing to
> original intent can make the case.

FWIW, it does seem like an improvement to me.

--
Robert Haas
EDB: http://www.enterprisedb.com



Re: 'converts internal representation to "..."' comment is confusing

От
Steve Chavez
Дата:
Hello hackers,

Tom, could we apply this patch since Robert agrees it's an improvement?

Best regards,
Steve 

On Tue, 16 May 2023 at 07:49, Robert Haas <robertmhaas@gmail.com> wrote:
On Sun, May 14, 2023 at 9:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Steve Chavez <steve@supabase.io> writes:
> > I found "..." confusing in some comments, so this patch changes it to
> > "cstring". Which seems to be the intention after all.
>
> Those comments are Berkeley-era, making them probably a decade older
> than the "cstring" pseudotype (invented in b663f3443).  Perhaps what
> you suggest is an improvement, but I'm not sure that appealing to
> original intent can make the case.

FWIW, it does seem like an improvement to me.

--
Robert Haas
EDB: http://www.enterprisedb.com

Re: 'converts internal representation to "..."' comment is confusing

От
Heikki Linnakangas
Дата:
On 24/06/2023 23:52, Steve Chavez wrote:
> On Tue, 16 May 2023 at 07:49, Robert Haas <robertmhaas@gmail.com 
> <mailto:robertmhaas@gmail.com>> wrote:
> 
>     On Sun, May 14, 2023 at 9:37 PM Tom Lane <tgl@sss.pgh.pa.us
>     <mailto:tgl@sss.pgh.pa.us>> wrote:
>      > Steve Chavez <steve@supabase.io <mailto:steve@supabase.io>> writes:
>      > > I found "..." confusing in some comments, so this patch changes
>     it to
>      > > "cstring". Which seems to be the intention after all.
>      >
>      > Those comments are Berkeley-era, making them probably a decade older
>      > than the "cstring" pseudotype (invented in b663f3443).  Perhaps what
>      > you suggest is an improvement, but I'm not sure that appealing to
>      > original intent can make the case.
> 
>     FWIW, it does seem like an improvement to me.
> 
> Tom, could we apply this patch since Robert agrees it's an improvement?

Looking around at other input/output functions, we're not very 
consistent, there are many variants of "converts string to [datatype]", 
"converts C string to [datatype]", and "input routine for [datatype]". 
They are all fine, even though they're inconsistent. Doesn't seem worth 
the code churn to change them.

Anyway, I agree this patch is an improvement, so applied. Thanks!

-- 
Heikki Linnakangas
Neon (https://neon.tech)