{"id":10264,"date":"2026-01-16T05:59:12","date_gmt":"2026-01-16T05:59:12","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=10264"},"modified":"2026-01-16T05:59:14","modified_gmt":"2026-01-16T05:59:14","slug":"create-user-postgresql","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/","title":{"rendered":"How to Create User in PostgreSQL"},"content":{"rendered":"\n<p>PostgreSQL is a popular database used widely by businesses, websites &amp; apps. Often PostgreSQL database administrators need to create &amp; manage users. It is very important to understand what a PostgreSQL user is, what it can and cannot do, and how it is different from PostgreSQL role. This knowledge allows database admins to easily manage users, control user access and keep their data secure. In this article, we will learn how to create a PostgreSQL user.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#What_is_a_PostgreSQL_User\" >What is a PostgreSQL User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#PostgreSQL_User_vs_Role\" >PostgreSQL User vs Role<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#How_to_Create_User_in_PostgreSQL\" >How to Create User in PostgreSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#1_Log_into_PostgreSQL\" >1. Log into PostgreSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#2_Create_New_User\" >2. Create New User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#3_Grant_Privileges\" >3. Grant Privileges<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#4_Verify_User\" >4. Verify User<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#Best_Practices\" >Best Practices<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_PostgreSQL_User\"><\/span>What is a PostgreSQL User<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>A PostgreSQL user is a database account with a username and password, that can connect to the database. It is the basis for access control and data security. It is primarily used to authenticate and authorize a user to access one or more databases.<\/p>\n\n\n\n<p>There are mainly 2 types of users in PostgreSQL &#8211; regular users and superuser. A superuser is an account with a lot more privileges and access compared to a regular user. A database administrator is a superuser. A regular user can be assigned various permissions to select, insert, modify, remove data. This is mostly done by a superuser.<\/p>\n\n\n\n<p>But PostgreSQL also supports Roles, which can be confusing for many database developers. So let us look at the difference between PostgreSQL user and role.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"PostgreSQL_User_vs_Role\"><\/span>PostgreSQL User vs Role<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Before we look at steps to create new user, it is very important to understand the difference between user and role in PostgreSQL.<\/p>\n\n\n\n<p>A PostgreSQL user is an entity that can log into PostgreSQL. Depending on the privileges granted to it, the user can perform various tasks such as access database, select rows, insert data and more.<\/p>\n\n\n\n<p>A PostgreSQL role is a group of such user privileges. When a user is assigned a role then it gets all the privileges present in the role. It is useful to easily manage privileges of multiple users.<\/p>\n\n\n\n<p>Please note, a user need not have a role, and a role cannot log into PostgreSQL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Create_User_in_PostgreSQL\"><\/span>How to Create User in PostgreSQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here are the steps to create PostgreSQL user. You can use PostgreSQL console or GUI tools like PgAdmin to create new users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Log_into_PostgreSQL\"><\/span>1. Log into PostgreSQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First of all, log into PostgreSQL prompt as a superuser. Only a superuser has the privilege to create new users. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo -u postgres psql<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Create_New_User\"><\/span>2. Create New User<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Run CREATE USER command as shown to create new user. Replace &lt;username> and &lt;password> with the username &amp; password of your choice.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE USER &lt;username> WITH ENCRYPTED PASSWORD '&lt;password>';<\/pre>\n\n\n\n<p>The above command will create a vanilla user without any special privileges.<\/p>\n\n\n\n<p>Let us look at some specific use cases for user creation.<\/p>\n\n\n\n<p>Sometimes database administrators need to create a superuser. Here is the command to create new user with superuser rights.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE USER &lt;username> WITH SUPERUSER PASSWORD '&lt;password>';<\/pre>\n\n\n\n<p>If you want to create a user with the privilege to create databases, then use CREATEDB command in your query as shown.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE USER &lt;username> WITH CREATEDB PASSWORD '&lt;password>';<\/pre>\n\n\n\n<p>If you want to create a user with limited number of simultaneous connections, use this query. In this example, a user can only have 10 concurrent connections.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE USER &lt;username> WITH CONNECTION LIMIT 10 PASSWORD '&lt;password>';<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Grant_Privileges\"><\/span>3. Grant Privileges<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>By default, a new user can only log into PostgreSQL and not do much else. It cannot even access a database. So, depending on your requirement, you need to assign privileges to this new user.<\/p>\n\n\n\n<p>Let us look at some common use cases. Here is an example to grant all privileges to a database for new user. Replace &lt;database_name> and &lt;username> with the names of database and user respectively.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">GRANT ALL PRIVILEGES ON DATABASE &lt;database_name> to &lt;username>;<\/pre>\n\n\n\n<p>Often database administrators need to allow new user to use <em>public<\/em> schema, the default schema to store databases. You can do this with the following query.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">GRANT USAGE on SCHEMA public TO &lt;username>;<\/pre>\n\n\n\n<p>Here is the query to grant read only privileges to new user. It is commonly required in <a href=\"https:\/\/ubiq.co\/business-intelligence-software-tools\">business intelligence and reporting systems<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">GRANT SELECT ON ALL TABLES IN SCHEMA public to &lt;username>;<\/pre>\n\n\n\n<p>If you want to grant other privileges such as INSERT, UPDATE, etc. then add them in above query as shown.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public to &lt;username>;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Verify_User\"><\/span>4. Verify User<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Once you have created the new user, you can verify it with \\du command which <a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-all-users-in-postgresql\/\">lists all users<\/a> in your system, along with their privileges.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\\du<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Best_Practices\"><\/span>Best Practices<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Strong Username &amp; Password<\/strong> &#8211; These days there are so many bots and tools to guess passwords, not to mention data leaks. So it is best to use strong username and passwords that contain a combination of small and upper case letters, numbers and at least 1 special character. You can always change user passwords even after they are created.<\/li>\n\n\n\n<li><strong>Regularly Review User Permissions<\/strong> &#8211; You should only give as much user privilege as is required for a user. Don&#8217;t give extra permissions unnecessarily. They may be exploited. These permissions must be reviewed regularly to ensure they are in line with the role changes in your database.<\/li>\n\n\n\n<li><strong>Monitor User activity<\/strong> &#8211; Use tools like pg_stat_statements and pgAudit to periodically monitor user activity. Check if any user is running suspicious queries. Prevention is better than cure.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Proper user management is essential to manage databases. In this article, we have learnt how to create new PostgreSQL user. We learnt how a user is different from role, and also some of the best practices in user management. Using strong user credentials, providing user access only when needed and regularly reviewing user activity and permissions, will help database administrators manage users more effectively.<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-all-users-in-postgresql\/\">How to List All Users in PostgreSQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-alter-column-from-null-to-not-null\/\">How to Alter Column from NULL to NOT NULL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-prevent-sql-injection-attack\/\">How to Prevent SQL Injection Attack<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PostgreSQL administrators need to often create new users. Here is how to create user in PostgreSQL database.<\/p>\n","protected":false},"author":1,"featured_media":10285,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[348],"tags":[623],"class_list":["post-10264","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql","tag-create-user"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create User in PostgreSQL - Ubiq BI<\/title>\n<meta name=\"description\" content=\"PostgreSQL administrators need to often create new users. Here is how to create user in PostgreSQL database.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create User in PostgreSQL - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"PostgreSQL administrators need to often create new users. Here is how to create user in PostgreSQL database.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-16T05:59:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-16T05:59:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"301\" \/>\n\t<meta property=\"og:image:height\" content=\"201\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Create User in PostgreSQL\",\"datePublished\":\"2026-01-16T05:59:12+00:00\",\"dateModified\":\"2026-01-16T05:59:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/\"},\"wordCount\":891,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg?fit=301%2C201&ssl=1\",\"keywords\":[\"create user\"],\"articleSection\":[\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/\",\"name\":\"How to Create User in PostgreSQL - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg?fit=301%2C201&ssl=1\",\"datePublished\":\"2026-01-16T05:59:12+00:00\",\"dateModified\":\"2026-01-16T05:59:14+00:00\",\"author\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"PostgreSQL administrators need to often create new users. Here is how to create user in PostgreSQL database.\",\"breadcrumb\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg?fit=301%2C201&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg?fit=301%2C201&ssl=1\",\"width\":301,\"height\":201,\"caption\":\"create new user in postgresql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ubiq.co\/tech-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create User in PostgreSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/\"],\"url\":\"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create User in PostgreSQL - Ubiq BI","description":"PostgreSQL administrators need to often create new users. Here is how to create user in PostgreSQL database.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/","og_locale":"en_US","og_type":"article","og_title":"How to Create User in PostgreSQL - Ubiq BI","og_description":"PostgreSQL administrators need to often create new users. Here is how to create user in PostgreSQL database.","og_url":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2026-01-16T05:59:12+00:00","article_modified_time":"2026-01-16T05:59:14+00:00","og_image":[{"width":301,"height":201,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg","type":"image\/jpeg"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Create User in PostgreSQL","datePublished":"2026-01-16T05:59:12+00:00","dateModified":"2026-01-16T05:59:14+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/"},"wordCount":891,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg?fit=301%2C201&ssl=1","keywords":["create user"],"articleSection":["PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/","url":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/","name":"How to Create User in PostgreSQL - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg?fit=301%2C201&ssl=1","datePublished":"2026-01-16T05:59:12+00:00","dateModified":"2026-01-16T05:59:14+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"PostgreSQL administrators need to often create new users. Here is how to create user in PostgreSQL database.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg?fit=301%2C201&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg?fit=301%2C201&ssl=1","width":301,"height":201,"caption":"create new user in postgresql"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Create User in PostgreSQL"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/01\/create-new-user-postgresql.jpg?fit=301%2C201&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2Fy","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/10264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=10264"}],"version-history":[{"count":22,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/10264\/revisions"}],"predecessor-version":[{"id":10287,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/10264\/revisions\/10287"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/10285"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=10264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=10264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=10264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}