Azure_superuser account password for Postgresql database on Azure - postgresql

I have provisioned Azure Database for Postgresql, I'm trying to execute copy command in c# Azure function to load data from csv file to the database.
It throws an error saying ERROR: must be superuser to COPY to or from a file
The question is how do I use the user Azure_superuser, where do I get password for this account. This account is automatically created while setting up the PostgreSQL on Azure.

Because this is a PaaS service, you will not have access to the Super User account. You will have access to the Admin account:Azure PostgreSQL Server Admin Document

Related

CLoudSQL permission to create schema

I am trying to create a schema in my CloudSQL postgresql instance.
My service account user has the below roles assigned:
Cloud SQL Client
Cloud SQL Editor
Cloud SQL Instance User
And on executing the create schema command I am getting the error:
ERROR: permission denied for database *******
The google doc didn't seem to be clear on the role for specific PostgreSQL commands.
Am I doing something wrong? This works if I give CloudSQL Admin role.

Azure SQL dbmanager/loginmanager can create but not access database

I have created a new sql account and assigned it dbmanager and loginmanager roles. It can be used to create new databases but I am not able to access the database afterwards with that user. When right clicking the new database to run a query, the login prompt apears and says that the security principal %user% can access the database under the current security context.
I am not able to alter or grant user any access to the DB now that I can't even run any queries.
The purpose here is that I have a powershell script that creates the databases and handles the automation under a spesific SQL user. What am I missing?
The login might lacks the necessary permissions to connect to the specified database. Logins that can connect to this instance of SQL Server but do not have particular database rights inherit the guest user's permissions. This is a security feature that prevents users from connecting to databases where they do not have permissions. When the guest user does not have CONNECT permission to the identified database and the trustworthy attribute is not set, this error message appears. When the guest user does not have CONNECT authorization to the listed database, this error message appears.
You can connect to the database in one of the following ways:
Grant the specific login access to the named database.
Grant the CONNECT permission to the database named in the error message for the guest user.
Enable the TRUSTWORTHY property on the database that has authenticated the user.
Please refer to the Microsoft Document for this error: MSSQLSERVER_916

Using AWS RDS Postgresql database with a login from secrets manager

So, I've been looking around for more details, but can't find it.
I have a AWS RDS Postgresql cluster. In the typical sense, when I want to add a login to my database, I use the
create user xxxx with password 'yyy'
then I grant that user access to the tables and other rights.
Now, I tried to add another user with secrets manager linked to this RDS database.
I'm not sure what to do next....should that new user I only created in secrets, appear in the login for the database, because I don't see it? How would we grant access to the tables and other things for that user?

Azure Database for PostgreSQL server - Permission denied to create a table space

Context
In our application we have multiple tablespace, basically for allocating different sizes.
We are evaluating to deploy our application in Azure Database for PostgreSQL server.
Problem
While trying to create a table space we got the error
ERROR: permission denied to create tablespace "tec_large"
HINT: Must be a superuser to create a tablespace
On search we got to this information , which basically says
the server admin account is not part of the azure_superuser role. Since this service is a managed PaaS service, only Microsoft is part of the super user role.
Can someone please give a hint on this. Is this a no solution limitation of the Azure offer. Or Is there any possibility to hack around.

Can't create new schema in an OVH postgres

I have a PostgreSQL server on OVH's Cloud DB and have been using its databases for my web apps.
So far so good.
I got a project where It's a requirement to have schemas. Strangely enough, I am unable to create schemas on the user with "Administrator" privileges.
I have prepared scripts using schemas, so I just need to run them on a prepared database but I need a database with schemas to run them.
Here is my process:
Create a new database
Select option "Create user"
Select option for privilages: "Administrator"
Commit configuration
Wait for database creation
Connect to database with the new config via PGAdmin
Run command create schema if not exists "vMobile";
Recieve following error:
ERROR: permission denied for database my-database-dev
SQL state: 42501
I created a ticket for this but the wait is taking too long.
Support answer
Ok, so I got a response from the OVH support and there is no option for the user to create new schemas as their CloudDB enables access only to schema public and mentioned privileges Administrator, Read/Write, Read, None are only applicable to the public schema.
Workaround
My solution to this is to create tables with schema name included in their names
like so:
Desired outcome: "vCommon"."Route"
Workaround: "public"."vCommon_Route"