Postgres is more picky about submitting a string to the id column in a
table. Postgres requires the use of only integers for the array of
values in a select statement containing: where id IN (...array...)
This patch fixes all the following class of problems:
SELECT * FROM "ssh_keys" WHERE
"ssh_keys"."deleted_at" IS NULL AND ((id IN ('host')) OR (name IN
('host'))) ORDER BY "ssh_keys"."id" ASC LIMIT 1 [0 rows affected or
returned ] error: pq: invalid input syntax for
type integer: "host"
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
The userkey rm command implies that it can remove a key by user or the
id key, but it only works against the data base id of the key. This
patch allows the userkey rm command to work with the user name, so
that all the keys for the user can be cleared out in one command.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>