From: | Thomas Kellerer <shammat(at)gmx(dot)net> |
---|---|
To: | Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Out of memory error |
Date: | 2021-11-24 12:10:45 |
Message-ID: | a772e833-1c0f-4cae-4d08-04bfdfb2fb5e@gmx.net |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
aditya desai schrieb am 24.11.2021 um 08:35:
> Hi Thomas,
> v_message is of composite data type r_log_message and it's definition is as shown below.
>
> postgres=# \d r_log_message;
> Composite type "public.r_log_message"
> Column | Type | Collation | Nullable | Default
> -------------+-------------------------+-----------+----------+---------
> column_name | character varying(30) | | |
> oldvalue | character varying(4000) | | |
> newvalue | character varying(4000) | | |
>
> Regards,
> Aditya.
Sorry, didn't see that.
Then you need to create records of that type in the array:
v_message := array[('empName', old.empname, new.empname)::r_log_message, ('location', old.location, new.location)::r_log_message];
or an array of that type:
v_message := array[('empName', old.empname, new.empname), ('location', old.location, new.location)]::r_log_message[];
Btw: why don't you use `text` instead of varchar(4000).
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Kellerer | 2021-11-24 12:12:14 | Re: Out of memory error |
Previous Message | hpc researcher_mspk | 2021-11-24 12:05:50 | Postgres process count GCC vs Clang is Different on autovaccum=on |