0
votes
CREATE OR REPLACE FUNCTION Test_Param_Insert_Data(p_schema_table text, p_dblinkcon text) RETURNS void AS $$
declare 
    rec p_schema_table;
BEGIN
....

How to use function parameter p_schema_table as composite_type_name e.g. rec public.customer.

I tested create function, but error return

ERROR: type "p_schema_table" does not exist

Why plpgsql language don't understand p_schema_table is passing function parameter, It's should treat to table name e.g public.customer

1

1 Answers

0
votes

You can't declare variable, which type is passed as parameter. In such case you should declare it using RECORD type.