Skip to content

Commit

Permalink
Merge pull request #818 from fcolista/master
Browse files Browse the repository at this point in the history
src/manage_pg.c : fix for gvmd error  'sql: (null)' when initialize the db
  • Loading branch information
timopollmeier authored Oct 18, 2019
2 parents fca20be + 7638a81 commit 83cb3e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Faster counting in GET_REPORTS when ignoring pagination [#795](https://github.com/greenbone/gvmd/pull/795)
- Improve performance of GET_REPORTS [#797](https://github.com/greenbone/gvmd/pull/797)
- Consider results_trash when deleting users [#800](https://github.com/greenbone/gvmd/pull/800)
- Escaping correctly the percent sign in sql statements [#818](https://github.com/greenbone/gvmd/pull/818)

### Removed
- Remove suport for "All SecInfo": removal of "allinfo" for type in get_info [#790](https://github.com/greenbone/gvmd/pull/790)
Expand Down
4 changes: 2 additions & 2 deletions src/manage_pg.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ manage_create_sql_functions ()
" BEGIN"
" CASE"
" WHEN NOT valid_db_resource_type ($1)"
" THEN RAISE EXCEPTION 'Invalid resource type argument: %', $1;"
" THEN RAISE EXCEPTION 'Invalid resource type argument: %%', $1;"
" WHEN $1 = 'note'"
" AND $3 = " G_STRINGIFY (LOCATION_TABLE)
" THEN RETURN (SELECT 'Note for: '"
Expand Down Expand Up @@ -937,7 +937,7 @@ manage_create_sql_functions ()
" ELSIF $1 > 0.0 AND $1 <= 10.0 THEN"
" RETURN 'Alarm';"
" ELSE"
" RAISE EXCEPTION 'Invalid severity score given: %', $1;"
" RAISE EXCEPTION 'Invalid severity score given: %%', $1;"
" END IF;"
" END;"
"$$ LANGUAGE plpgsql"
Expand Down

0 comments on commit 83cb3e1

Please sign in to comment.