Postgres module

line_column_of_position

procedure · 1 overloadsince 0.27.0Source

The line and column of a 1-based character position in text, or 0 and 0 for no position.

line_column_of_position :: (
    text: string,
    position: s64
) -> (line: s64, column: s64)

The line and column of a 1-based character position in text, or 0 and 0 for no position.

Parameters

text: string
the text the position counts into.
position: s64
1-based, in characters. 0 or less means no position.

Returns

line: s64
column: s64

See also