Name type in postgres
Name type in postgres
От:
mohsen soodkhah mohammadi <mohsensoodkhah@gmail.com>
Дата:
hello.
I want do understand that did can we have name without null-terminator?Name s = PG_GETARG_NAME(0);
PG_RETURN_CSTRING(pstrdup(NameStr(*s)));
Re: Name type in postgres
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
mohsen soodkhah mohammadi writes: > I want do understand that did can we have name without null-terminator? No. Possibly that was the original intention, but for many years the system has enforced that Name contains at least one trailing null byte, ie the maximum usable length of identifiers is NAMEDATALEN-1. So the code you quote is valid. regards, tom lane