Introduction
PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the Ingres database developed at the University of California, Berkeley. PostgreSQL is a powerful, open-source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
We can download and install the official certified PostgreSQL database from EnterpriseDB (EDB) site.
You can select pgAdmin 4 for administering the database.
Please provide a password for the database superuser.
Choose the default port and locale and start installing the database.
After few minutes, PostgreSQL will be installed on your machine.
We can open pgAdmin 4 tool now.
Please set a master password for pgAdmin. We must give this password, later we open the pgAdmin.
We can see a default server PostgreSQL 12. You must give your superuser password to open this server.
By default, there is one login role “postgres” and some group roles available. We can create one more group role.
You can set a password to your group role in the “Definition” tab.
You must set at least the “Can login” option to “Yes” inside the “Privileges” tab. Otherwise, you can’t do database operations with this group role.
We can create a new database now. I have chosen the owner name as “sarath” which was created recently.
In Postgres, each table comes under schemas. By default, there is a “public” schema for each database.
We can create a new table inside the public schema. You can either create a table using the graphical feature in pgAdmin or by SQL scripts.
We can choose the “Query Tool” from the “Tools” menu to enter SQL scripts and execute.
Create a table “patients” under the “public” schema. We set the owner of the table to “sarath”
- CREATE TABLE public.patients
- (
- id character varying(50) NOT NULL,
- name character varying(200) NOT NULL,
- address character varying(500),
- city character varying(100),
- age numeric NOT NULL,
- gender character varying(10),
- CONSTRAINT patient_pkey PRIMARY KEY (id)
- );
- ALTER TABLE public.patients
- OWNER TO sarath;

Jamil MoughalPosted Aug 16, 2023, 6:42 PM
Thanks for sharing
Dheerendra DwivediPosted Apr 26, 2022, 12:58 PM
I Created Procedure in PostgreSQL .My question that "How to call procedure while i am using EF "?
John DAntonioPosted Jun 21, 2021, 5:49 PM
What would be the best way to make this accept multiple json objects?
alok singhPosted Mar 1, 2021, 10:11 AM
How to use this api in flutter ? can u help me out
prabhat chandraPosted Oct 9, 2020, 1:48 AM
Hi please confirm which approach is this DBFirst or model first approach please confirm as soon as possible
Rutuparna PandaPosted Sep 29, 2020, 4:52 AM
When I am try to send post request I am getting an exception:{ "Message": "An error has occurred.", "ExceptionMessage": "An error occurred when trying to create a controller of type 'UserController'. Make sure that the controller has a parameterless public constructor.", "ExceptionType": "System.InvalidOperationException", "StackTrace": " at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)\r\n at System.Web.Http.Controllers.HttpControllerDescriptor.CreateController(HttpRequestMessage request)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()", "InnerException": { "Message": "An error has occurred.", "ExceptionMessage": "Type 'CP_API.Controllers.UserController' does not have a default constructor", "ExceptionType": "System.ArgumentException", "StackTrace": " at System.Linq.Expressions.Expression.New(Type type)\r\n at System.Web.Http.Internal.TypeActivator.Create[TBase](Type instanceType)\r\n at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.GetInstanceOrActivator(HttpRequestMessage request, Type controllerType, Func`1& activator)\r\n at System.Web.Http.Dispatcher.DefaultHttpControllerActivator.Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)" } }
Ben HayatPosted May 18, 2020, 11:46 PM
The link to download the code is broken and goes back to this page