Re: WIP: to_char, support for EEEE format - Mailing list pgsql-hackers

From Brendan Jurd
Subject Re: WIP: to_char, support for EEEE format
Date
Msg-id 37ed240d0907300754q3267fa9cpa3b4f874c20bb1b0@mail.gmail.com
Whole thread Raw
In response to Re: WIP: to_char, support for EEEE format  (Euler Taveira de Oliveira <euler@timbira.com>)
Responses Re: WIP: to_char, support for EEEE format
List pgsql-hackers
2009/7/30 Euler Taveira de Oliveira <euler@timbira.com>:
>> So if you put the test inside the switch, it would need to appear in
>> every single branch of the switch except for the NUM_E one.  I'm
>> confused about why you think this needs a comment.  Perhaps I
>> misunderstood you?
>>
> Yes, I know you need to modify every 'case' clause to test if EEEE was
> previously used (that was one suggestion) but I said if you don't want to go
> that way, add a comment explaining why you're using that 'if' above the
> 'switch' and not inside it.
>

I think we've pretty much reached an impasse on this one.

I can't imagine anyone reading the code getting confused about this,
and don't know how to go about writing a comment explaining something
that is intuitively obvious to me.  I don't understand what aspect of
it requires explanation.  The test is not in the switch because it
doesn't belong there.

Perhaps someone else could weigh in and help us to resolve this?

Cheers,
BJ


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Review: Revise parallel pg_restore's scheduling heuristic
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: WIP: to_char, support for EEEE format