SQL strings need to be quoted in single quotes and single quotes need to be doubled. The fact that sqlite also accepts double quotes if it can't find a corresponding field as strings doesn't change that. for fun (and proof), try pkg query -e '%n=name' '%o' on a non-empty installation ;)
modified pkg/query.c
@@ -525,10 +525,10 @@ format_sql_condition(const char *str, struct sbuf *sqlcond)
|
|
|
|
|
|
| - | |
|
|
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
@@ -546,25 +546,22 @@ format_sql_condition(const char *str, struct sbuf *sqlcond)
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|