Description
Submitted by: Valdir Stiebe Junior (ogecrom)
Relate to CORE2621
Replaces CORE2686
Votes: 5
SFID: 1421984#
Submitted By: ogecrom
I don't know the complexity of this but it will be good if I could create my own type in PSQL. For example:
create record type TPERSON (
NAME varchar(100),
AGE integer);
I don't think that this is useful for domains or table columns. But it is useful for reducing the amount of code and parameters between stored procedures.
For example, I use a "instead of insert" trigger for a view. In this trigger I could fill a variable of this type and then pass it to a stored procedure wich expects a parameter of this type. The assignment and reading of the values would be like http://MYVAR.NAME. This procedure, tests some values of the type, but it must pass the entire type to other procedure that use all the other values.
If you think that this feature should be added in domains (and consequently in table columns), instead of a record type, remember to allow the use of "select column.*", "select http://column.NAME" and "select column" (as an alias for "select column.*").
If you need a better explaining of my example, or another question, just ask.