Обсуждение: Why can't we used CAPITAL LETTERS into replication slot_name?

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

Why can't we used CAPITAL LETTERS into replication slot_name?

От
Rushabh Lathia
Дата:
Hi,

I am just wondering why pg_create_physical_replication_slot() can't take CAPITAL LETTERS into slot_name ?

Comment over ReplicationSlotValidateName() says that - Slot names may consist out of [a-z0-9_]{1,NAMEDATALEN-1} which should allow the name to be used as a directory name on every supported OS.

If its by design then was should atleast change the hint into ReplicationSlotValidateName() which says: "Replication slot names may only contain letters, numbers, and the underscore character."

Comments ?


Regards,
Rushabh Lathia

Re: Why can't we used CAPITAL LETTERS into replication slot_name?

От
Andres Freund
Дата:
Hi,

On 2015-09-25 17:32:39 +0530, Rushabh Lathia wrote:
> I am just wondering why pg_create_physical_replication_slot() can't take
> CAPITAL LETTERS into slot_name ?

Windows. And OSX. Specifically case-insensitive filenames.

> If its by design then was should atleast change the hint into
> ReplicationSlotValidateName() which says: "Replication slot names may only
> contain letters, numbers, and the underscore character."

We could add a 'lower case' in there.

Greetings,

Andres Freund



Re: Why can't we used CAPITAL LETTERS into replication slot_name?

От
Rushabh Lathia
Дата:
Thanks Andres.

PFA patch to fix the hint message.

On Fri, Sep 25, 2015 at 5:34 PM, Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2015-09-25 17:32:39 +0530, Rushabh Lathia wrote:
> I am just wondering why pg_create_physical_replication_slot() can't take
> CAPITAL LETTERS into slot_name ?

Windows. And OSX. Specifically case-insensitive filenames.

> If its by design then was should atleast change the hint into
> ReplicationSlotValidateName() which says: "Replication slot names may only
> contain letters, numbers, and the underscore character."

We could add a 'lower case' in there.

Greetings,

Andres Freund



Regards,
Rushabh Lathia
Вложения

Re: Why can't we used CAPITAL LETTERS into replication slot_name?

От
Andres Freund
Дата:
Hi,
On 2015-09-25 17:39:41 +0530, Rushabh Lathia wrote:
> PFA patch to fix the hint message.

The patched missed updating the regression test output files ;)

Committed and backpatched back to 9.4. Thanks!

- Andres