Re: SYSTEM_USER reserved word implementation

From: Jacob Champion <jchampion(at)timescale(dot)com>
To: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Joe Conway <mail(at)joeconway(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: SYSTEM_USER reserved word implementation
Date: 2022-09-27 22:38:49
Message-ID: 32514125-2688-00c3-0210-44a467dd0470@timescale.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/26/22 06:29, Drouvot, Bertrand wrote:
> Please find attached V4 taking care of Jacob's previous comments.

> + /*
> + * InitializeSystemUser should already be called once we are sure that
> + * authn_id is not NULL (means auth_method is actually valid).
> + * But keep the test here also for safety.
> + */
> + if (authn_id)

Since there are only internal clients to the API, I'd argue this makes
more sense as an Assert(authn_id != NULL), but I don't think it's a
dealbreaker.

> As far the assertion failure mentioned by Michael when moving the
> SVFOP_SYSTEM_USER from NAMEOID to TEXTOID: V4 is assuming that it is
> safe to force the collation to C_COLLATION_OID for SQLValueFunction
> having a TEXT type, but I would be happy to also hear your thoughts
> about it.

Unfortunately I don't have much to add here; I don't know enough about
the underlying problems.

Thanks,
--Jacob

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kaiting Chen 2022-09-27 22:39:40 Re: Allow foreign keys to reference a superset of unique columns
Previous Message Tom Lane 2022-09-27 22:25:45 Re: Allow foreign keys to reference a superset of unique columns