Skip to content

Commit

Permalink
remove this
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Feb 6, 2025
1 parent 81d28a8 commit 6bdb098
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/sql/postgres.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2315,22 +2315,6 @@ pub const PostgresSQLConnection = struct {
'\\' => buffer[out_index] = '\\', // Backslash
'\'' => buffer[out_index] = '\'', // Single quote

// PostgreSQL specific escapes
'0'...'7' => {
// Octal escape sequence (\nnn)
if (i + 2 >= input.len) return error.InvalidOctalSequence;

const octal_str = input[i..@min(i + 3, input.len)];
var octal_len: usize = 1;
while (octal_len < 3 and octal_len < octal_str.len and
octal_str[octal_len] >= '0' and octal_str[octal_len] <= '7') : (octal_len += 1)
{}

const octal_value = try std.fmt.parseInt(u8, octal_str[0..octal_len], 8);
buffer[out_index] = octal_value;
i += octal_len - 1;
},

// JSON allows forward slash escaping
'/' => buffer[out_index] = '/',

Expand Down

0 comments on commit 6bdb098

Please sign in to comment.