SET SESSION AUTHORIZATION DEFAULT causes syntax error

Using Npgsql from .NET code to connect to database, now and then I get the error 42601: syntax error at or near “default”.

The statement is : SET SESSION AUTHORIZATION DEFAULT

Cockroach does not support the DEFAULT.

My code does not issue that statement explicitly, it must be issued automatically by npgsql, I assume.

Hey @jroelens,

What code are you issuing when you are receiving the error, I’m interested in knowing if it’s related to that statement being allegedly issued by npgsql automatically.

Where are you receiving this error?

Just want to confirm that you are following this document for reference.

Thanks,
Matt

I use the standard code, similar to your example, with 2 differences:

  1. I use username and password instead of certificates
  2. I use .net framework 4.6.1 instead of dotnet

My packages.config has: (installed via nuget)

The error does not happen every time. The error seems to happen on the second request to the server within a session, not on the first.

packages.config didn’t make i tthrough.
Anyway it’s npgsql version 4.0.8

Are you able to post your code so I can try to reproduce this issue?

You can private message me if you’d like.

Your username and password credentials are not needed.

Thanks,
Matt

We’re sorry, but your email message to [“cockroachlabs+762822c769c4293152afa5345a8b6df8@discoursemail.com ”] (titled RE: [Cockroach Labs] [General] SET SESSION AUTHORIZATION
DEFAULT causes syntax error) didn’t work.

Reason:

Sorry, new users can only mention 2 users in a post.

If you can correct the problem, please try again.

You can email me directly at mvardi@cockroachlabs.com

Thanks for the email.

Are your initial queries/updates succeeding?

Can’t you just accept the DEFAULT keyword on the SET SESSION AUTHORIZATION command, and comply with the official postgresql language?

Please see https://www.postgresql.org/docs/10/sql-set-session-authorization.html

Hi,

I’ve created an issue to support this feature.

You can follow it here.