Commit d49fa4c8 authored by Neil Conway's avatar Neil Conway

Fix typos in comments and error messages in HStore. Patch from Filip

Rembialkowski, with some additional fixes by myself.
parent 5b2def89
...@@ -143,7 +143,7 @@ get_val(HSParser * state, bool ignoreeq, bool *escaped) ...@@ -143,7 +143,7 @@ get_val(HSParser * state, bool ignoreeq, bool *escaped)
st = GV_INESCVAL; st = GV_INESCVAL;
} }
else else
elog(ERROR, "Unknown state %d at postion line %d in file '%s'", st, __LINE__, __FILE__); elog(ERROR, "Unknown state %d at position line %d in file '%s'", st, __LINE__, __FILE__);
state->ptr++; state->ptr++;
} }
...@@ -195,11 +195,11 @@ parse_hstore(HSParser * state) ...@@ -195,11 +195,11 @@ parse_hstore(HSParser * state)
} }
else if (*(state->ptr) == '\0') else if (*(state->ptr) == '\0')
{ {
elog(ERROR, "Unexpectd end of string"); elog(ERROR, "Unexpected end of string");
} }
else if (!isspace((unsigned char) *(state->ptr))) else if (!isspace((unsigned char) *(state->ptr)))
{ {
elog(ERROR, "Syntax error near '%c' at postion %d", *(state->ptr), (int4) (state->ptr - state->begin)); elog(ERROR, "Syntax error near '%c' at position %d", *(state->ptr), (int4) (state->ptr - state->begin));
} }
} }
else if (st == WGT) else if (st == WGT)
...@@ -210,11 +210,11 @@ parse_hstore(HSParser * state) ...@@ -210,11 +210,11 @@ parse_hstore(HSParser * state)
} }
else if (*(state->ptr) == '\0') else if (*(state->ptr) == '\0')
{ {
elog(ERROR, "Unexpectd end of string"); elog(ERROR, "Unexpected end of string");
} }
else else
{ {
elog(ERROR, "Syntax error near '%c' at postion %d", *(state->ptr), (int4) (state->ptr - state->begin)); elog(ERROR, "Syntax error near '%c' at position %d", *(state->ptr), (int4) (state->ptr - state->begin));
} }
} }
else if (st == WVAL) else if (st == WVAL)
...@@ -247,7 +247,7 @@ parse_hstore(HSParser * state) ...@@ -247,7 +247,7 @@ parse_hstore(HSParser * state)
} }
else if (!isspace((unsigned char) *(state->ptr))) else if (!isspace((unsigned char) *(state->ptr)))
{ {
elog(ERROR, "Syntax error near '%c' at postion %d", *(state->ptr), (int4) (state->ptr - state->begin)); elog(ERROR, "Syntax error near '%c' at position %d", *(state->ptr), (int4) (state->ptr - state->begin));
} }
} }
else else
...@@ -271,7 +271,7 @@ comparePairs(const void *a, const void *b) ...@@ -271,7 +271,7 @@ comparePairs(const void *a, const void *b)
if (res) if (res)
return res; return res;
/* guarantee that neddfree willl be later */ /* guarantee that needfree will be later */
if (((Pairs *) b)->needfree == ((Pairs *) a)->needfree) if (((Pairs *) b)->needfree == ((Pairs *) a)->needfree)
return 0; return 0;
else if (((Pairs *) a)->needfree) else if (((Pairs *) a)->needfree)
......
...@@ -112,7 +112,7 @@ delete(PG_FUNCTION_ARGS) ...@@ -112,7 +112,7 @@ delete(PG_FUNCTION_ARGS)
*ed; *ed;
out->len = hs->len; out->len = hs->len;
out->size = hs->size; /* temprorary! */ out->size = hs->size; /* temporary! */
ptrs = STRPTR(hs); ptrs = STRPTR(hs);
es = ARRPTR(hs); es = ARRPTR(hs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment