(s string, t *types.T)
| 124 | } |
| 125 | |
| 126 | func truncateString(s string, t *types.T) string { |
| 127 | // If the string type specifies a limit we truncate to that limit: |
| 128 | // 'hello'::CHAR(2) -> 'he' |
| 129 | // This is true of all the string type variants. |
| 130 | if t.Width() > 0 { |
| 131 | s = util.TruncateString(s, int(t.Width())) |
| 132 | } |
| 133 | return s |
| 134 | } |
| 135 | |
| 136 | // ParseDOidAsInt parses the input and returns it as an OID. If the input |
| 137 | // is not formatted as an int, an error is returned. |
no test coverage detected
searching dependent graphs…