Open OlivierNguyen opened 8 years ago
I have a problem when I try to update my table : "Payload string too long".
I made the following change in the /packages/pg/observe-driver/setup-triggers.sql file :
7950 to 7500
And I don't really understand why It works. Can we get more informations about this code and what represents the 7950 ?
SELECT row_to_json(row_data)::TEXT INTO full_msg; SELECT char_length(full_msg) INTO full_len; SELECT (full_len / 7950) + 1 INTO page_count; SELECT md5(full_msg) INTO msg_hash; FOR cur_page IN 1..page_count LOOP PERFORM pg_notify('simple_pg_sjJN', msg_hash || ':' || page_count || ':' || cur_page || ':' || substr(full_msg, ((cur_page - 1) * 7950) + 1, 7950) );
Thanks in advance
It seems that the payload argument of the pg_notify function is maxed at 8000 bytes by default.
payload
pg_notify
http://www.postgresql.org/docs/9.4/static/sql-notify.html
I have a problem when I try to update my table : "Payload string too long".
I made the following change in the /packages/pg/observe-driver/setup-triggers.sql file :
And I don't really understand why It works. Can we get more informations about this code and what represents the 7950 ?
Thanks in advance