1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Allow hyphens in ltree labels

Also increase the allowed length of labels to 1000 characters

Garen Torikian

Discussion: https://postgr.es/m/CAGXsc+-mNg9Gc0rp-ER0sv+zkZSZp2wE9-LX6XcoWSLVz22tZA@mail.gmail.com
This commit is contained in:
Andrew Dunstan
2023-01-06 16:03:19 -05:00
parent a46a7011b2
commit b1665bf01e
6 changed files with 60 additions and 38 deletions

View File

@ -80,7 +80,7 @@ gettoken_query(QPRS_STATE *state, int32 *val, int32 *lenval, char **strval, uint
(state->buf)++;
return OPEN;
}
else if (ISALNUM(state->buf))
else if (ISLABEL(state->buf))
{
state->state = INOPERAND;
*strval = state->buf;
@ -93,7 +93,7 @@ gettoken_query(QPRS_STATE *state, int32 *val, int32 *lenval, char **strval, uint
errmsg("operand syntax error")));
break;
case INOPERAND:
if (ISALNUM(state->buf))
if (ISLABEL(state->buf))
{
if (*flag)
ereturn(state->escontext, ERR,