1

I'm currently writing some code which reads the pg_trigger catalog: specifically the tgargs column:

tgargs bytea
Argument strings to pass to trigger, each NULL-terminated

There's two problems I think I need to solve:

  • Is there a postgres function to split the bytea value on NULLs and get a postgres array back? I've had a look at this documentation page but couldn't find anything promising.
  • Converting bytes into text: which encoding is correct? Does it depend on the configured server encoding?
nyctef
  • 474
  • 6
  • 12

0 Answers0