Syntax error at or near $1 while trying to alter type in postgreSQL-9.6
问题 I'm trying to add a value to an enumerated type in postgreSQL-9.6, and am having trouble figuring out what I'm doing wrong. var tc = new NpgsqlCommand(@"ALTER TYPE attributeName ADD VALUE IF NOT EXISTS :a", conn); //tc.Parameters.Add(new NpgsqlParameter("a", NpgsqlDbType.Text)); //tc.Parameters[0].Value = "test"; tc.Parameters.AddWithValue("a", NpgsqlDbType.Text, "test"); tc.ExecuteNonQuery(); I tried both the commented out code and the current version, and both resulted in an exception. The