@@ -38,11 +38,6 @@ PG_FUNCTION_INFO_V1(decode_url);
3838PG_FUNCTION_INFO_V1 (encode_uri );
3939PG_FUNCTION_INFO_V1 (decode_uri );
4040
41- Datum url_encode (PG_FUNCTION_ARGS );
42- Datum url_decode (PG_FUNCTION_ARGS );
43- Datum uri_encode (PG_FUNCTION_ARGS );
44- Datum uri_decode (PG_FUNCTION_ARGS );
45-
4641static bool allowed_character (const char c , const char * unreserved_special );
4742static unsigned char char2hex (char c );
4843static char * write_character (char * output , const char c );
@@ -70,7 +65,7 @@ unsigned char char2hex(char c) {
7065 }
7166 ereport (ERROR , (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
7267 errmsg ("invalid hexadecimal digit: \"%c\"" , c )));
73- return -1 ;
68+ pg_unreachable () ;
7469}
7570
7671bool allowed_character (const char c , const char * unreserved_special ) {
@@ -147,7 +142,7 @@ bool is_utf8(const char *sequence, int length) {
147142// Check that sequence of bytes starts with 'symbol' in UTF-16 encoding
148143//
149144// UTF-16 'symbols' starts with '%u' or '%U', and 'XXXX' after it.
150- // 'XXXX' - hex sequence that encode bytes (optinally sequence 'XXXX' ->
145+ // 'XXXX' - hex sequence that encode bytes (optionally sequence 'XXXX' ->
151146// 'XXXXXXXX')
152147bool is_utf16 (const char * sequence , int length ) {
153148 return 6 <= length && sequence [0 ] == '%' &&
0 commit comments