Re: Mention column name in error messages

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Mention column name in error messages
Дата
Msg-id CA+TgmoarNVgRx07e6nFO21=XzMNwOztG0ttRQyx=daAYPs-HuQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Mention column name in error messages  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Mention column name in error messages  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Mon, Oct 17, 2016 at 3:18 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> Andres wrote:
>> +/* Support for TransformExprCallback */
>> +typedef struct TransformExprState
>> +{
>> +     const char *column_name;
>> +     Oid expected_type;
>> +} TransformExprState;
>> I see no need for this to be a struct defined in the header. Given that
>> TransformExprCallback isn't public, and the whole thing is specific to
>> TransformExprState...
>
> That's a matter of taste, really. Personally I find cleaner to declare
> that with the other static declarations at the top of the fil, and
> keep the comments of transformAssignedExpr clean of everything.

It's pretty standard practice for PostgreSQL to keep declarations
private to particular files whenever they are used only in that file.
And I'd argue that it's good practice in general.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: minor issue: \c without parameter disconnect current user
Следующее
От: Tom Lane
Дата:
Сообщение: Re: minor issue: \c without parameter disconnect current user