Joel Dudley <Joel.Dudley@DevelopOnline.com> writes:
> Thanks for your help. I had to clarify though, are you saying that it is
> impossible to do what I am trying to do? Thank you for your time.
No, you just have to realize that Postgres string values are not
null-terminated and so you can't manipulate them with the usual C
library string functions that expect to work on null-terminated strings.
At least not unless you convert them to null-terminated form first.
Try studying some of the built-in text mashing functions. textcat()
and nearby routines in src/backend/utils/adt/varlena.c would be good
starting points.
regards, tom lane