On 02.12.24 08:52, Tom Lane wrote:
>> (Moreover, the current structure assumes that the C character literal
>> syntax used by the PROKIND_* and other symbols happens to be the same as
>> the SQL string literal syntax required in those queries, which is just
>> an accident.)
> So? There isn't much about C syntax that isn't an accident.
> Neither literal syntax is going to change, so I don't see why
> it's problematic to rely on them being the same.
For example, if you write
#define RELKIND_RELATION '\x72'
then it won't work anymore.
I was also curious whether
#define FOO 'r'
#define RELKIND_RELATION FOO
would work. It appears it does. But this syntactic construction is
quite hard to completely understand currently.