Postgres module

byte_of_character

procedure · 1 overloadsince 0.27.0Source

The byte offset in text of a 1-based character position (what an ErrorResponse's P field counts, in characters, not bytes). Past the end, the end.

byte_of_character :: (text: string, character: s64) -> s64

The byte offset in text of a 1-based character position (what an ErrorResponse's P field counts, in characters, not bytes). Past the end, the end.

Parameters

text: string
the statement.
character: s64
the position, counted from 1.

Returns

s64

See also