Skip to content

Commit

Permalink
Add missing tables command to PostgreSQL session
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanusz-r7 committed Jan 4, 2024
1 parent 91328a1 commit e9ef209
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/rex/post/postgresql/ui/console/command_dispatcher/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,6 @@ def cmd_query(*args)
alias cmd_sql cmd_query
alias cmd_sql_help cmd_query_help

def cmd_db_help
print_line 'Usage: db'
print_line
print_line 'View the databases available on the remote target.'
print_line
end

#
# Open the Pry debugger on the current session
#
Expand Down Expand Up @@ -229,6 +222,11 @@ def cmd_db_help
print_line
end

def cmd_tables
tables = self.client.query('SELECT * FROM information_schema.tables;')
print_line format_result(tables).to_s
end

protected

def print_no_db_selected
Expand Down

0 comments on commit e9ef209

Please sign in to comment.