diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c
index 0eb48cf..13d6c22 100644
--- a/contrib/hstore/hstore_io.c
+++ b/contrib/hstore/hstore_io.c
@@ -76,6 +76,10 @@ get_val(HSParser *state, bool ignoreeq, bool *escaped)
 			{
 				elog(ERROR, "Syntax error near '%c' at postion %d", *(state->ptr), (int4) (state->ptr - state->begin));
 			}
+			else if (*(state->ptr) == ',')
+			{
+				elog(ERROR, "Syntax error near '%c' at postion %d", *(state->ptr), (int4) (state->ptr - state->begin));
+			}
 			else if (*(state->ptr) == '\\')
 			{
 				st = GV_WAITESCIN;
