Cannot insert into table I created

Using http interface, eg via Crash CLI, I see strange behaviour.

cr> create table logs5(pid varchar(10), process varchar(10));
CREATE OK, 1 row affected (0.255 sec)

cr> insert into logs5(pid, process) VALUES (“a”,“b”);
MissingPrivilegeException[Missing privilege for user ‘xyz’]

If I manually

grant all on TABLE doc.logs5 to xyz;

it makes no difference.

This seems to be different from what happens using the postgres interface.

What am I missing here?

Thank you.

Hi,
Could you try again with single quotes around a and b in the VALUES?

1 Like

Thanks for prompt reply. Yes that worked - I’m kicking myself for such a silly mistake - but obviously the privilige error threw me… is that catchall error that can mean many things?

The issue here is that "a" could refer to a function in one of the schemas in your search_path.
If you check SHOW search_path; there may be some schema to which user xyz does not have access.

1 Like

Much appreciated @hernanc