scram
[libpgclient.git] / util / pgsql_cmd.h
blob50a1909786661476ae7cefb314ebee98803c4596
1 /*Copyright (c) Brian B.
3 This library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Lesser General Public
5 License as published by the Free Software Foundation; either
6 version 3 of the License, or (at your option) any later version.
7 See the file LICENSE included with this distribution for more
8 information.
9 */
10 #ifndef __PGSQL_CMD_H__
11 #define __PGSQL_CMD_H__
13 #include <stdio.h>
14 #include <libex/str.h>
15 #include <libex/list.h>
16 #include "libpgcli/pgconn.h"
18 void print_result (pgconn_t *conn);
19 cstr_t *get_dbsize (pgconn_t *conn, char *dbname);
20 cstr_t *get_current_schema (pgconn_t *conn);
21 cstr_t *get_tablesize (pgconn_t *conn, char *schema, char *table);
22 cstr_t *get_tablerecs (pgconn_t *conn, char *schema, char *table);
24 void show (pgconn_t *conn, char **line, size_t *line_len);
25 void show_table (pgconn_t *conn, char **line, size_t *line_len);
26 void show_tables (pgconn_t *conn);
28 #endif