Re: [PROPOSAL] new diagnostic items for the dynamic sql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: Dinesh Chemuduru <dinesh(dot)kumar(at)migops(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PROPOSAL] new diagnostic items for the dynamic sql
Date: 2021-11-08 04:24:24
Message-ID: CAFj8pRDW-CWD8aJr7WV1KHPsMAF79_FA7FPe+6FJusf5cfZQCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

po 8. 11. 2021 v 5:07 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
napsal:

>
>>
>> +set_errcurrent_query (const char *query)
>>
>> You can remove the space prior to (.
>> I wonder if the new field can be named current_err_query because that's
>> what the setter implies.
>> current_query may give the impression that the field can store normal
>> query (which doesn't cause exception).
>> The following code implies that only one of internalquery and
>> current_query would be set.
>>
>
> yes, I think so current_query is not a good name too. Maybe query can be
> good enough - all in ErrorData is related to error
>

so the name of field can be query, and routine for setting errquery or
set_errquery

>
>
>> + if (estate->cur_error->internalquery)
>> + exec_assign_c_string(estate, var,
>> estate->cur_error->internalquery);
>> + else
>> + exec_assign_c_string(estate, var,
>> estate->cur_error->current_query);
>>
>> Cheers
>>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-11-08 04:33:04 Re: [PROPOSAL] new diagnostic items for the dynamic sql
Previous Message Michael Paquier 2021-11-08 04:24:10 Re: removing global variable ThisTimeLineID