Re: Add tests for object size limits of injection points

Поиск
Список
Период
Сортировка
От Chao Li
Тема Re: Add tests for object size limits of injection points
Дата
Msg-id 3A43F33C-B507-4BE9-B7BD-6FBDF0D58B92@gmail.com
обсуждение исходный текст
Ответ на Add tests for object size limits of injection points  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Add tests for object size limits of injection points
Список pgsql-hackers

> On Nov 10, 2025, at 09:11, Michael Paquier <michael@paquier.xyz> wrote:
>
> Hi all,
>
> While looking at a recent patch for injection points that has resulted
> in 16a2f706951e, I have been reminded that the point name, library
> name and function name have hardcoded limits, and it is now possible
> to have them tested by SQL.
>
> Attached is a patch to do so.  Thoughts?
> --
> Michael
> <0001-injection_points-Add-tests-for-name-limits.patch>

Maybe not a problem of this patch, but

```
+SELECT injection_points_attach(repeat('a', 64), 'injection_notice',
+  'TestInjectionNoticeFunc', NULL);
+ERROR:  injection point name aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa too long (maximum of 64)
```

Is really confused. The error message says “maximum of 64”, but the test right uses a name of length 64. I know that
thetricky is the ‘\0’ terminator, but should SQL writer have to keep mind about the ‘\0’ terminator? Should they just
considermaximum length as 63? 

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







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