Postgre has everything a relational database should have (foreign key cyclic, domains etc).
How do you use table valued parameters in postgre? Basically, I'm trying to pass a "table" of members to be created. Below is the TSQL for SQL 2008. How would you convert this to plpgsql? I know that Postgre has functions that are stored procedures.
CREATE TYPE members_datatype AS TABLE
PRIMARY KEY (username)
CREATE PROCEDURE CreateMembers
INSERT INTO members
SELECT * FROM @members;
And in the main code:
DECLARE @members AS member_table_datatype;
INSERT INTO @members
('jdoe', 'jdoe@email'), ('jdoe2', 'jdoe2@email') etc