How to move tables from one schema to another in PostgreSQL

In this article, we will see how to move tables from one schema to another in PostgreSQL. We can move the tables from one schema to another by using alter table command. Schemas are database objects. Same schema can be exists in different. But, tables of schema are different.

Syntax:

ALTER TABLE table_name SET SCHEMA schema_name;

Examples to move tables from one schema to another in PostgreSQL:
Continue reading How to move tables from one schema to another in PostgreSQL

What is the difference between SESSION_USER and CURRENT_USER in PostgreSQL

In this article, we will see the difference between SESSION_USER and CURRENT_USER in PostgreSQL.

Difference between SESSION_USER and CURRENT_USER in PostgreSQL:
SESSION_USER is the role name of the role that is connected to the database.
Continue reading What is the difference between SESSION_USER and CURRENT_USER in PostgreSQL