#include "../config.h"
#include <libpq-fe.h>
#include <postgres.h>
#include "buf.h"
#include "db_conn.h"
Include dependency graph for d_postgres_f.c:
Go to the source code of this file.
Data Structures | |
struct | DBConnection_PG |
PostgreSQL-specific connection data. More... | |
Defines | |
#define | BASENAME "Database" |
Database name. | |
#define | BASEHOST "Host" |
Database host. | |
#define | BASEPORT "Port" |
Database port. | |
#define | BASELOGIN "Username" |
Database username. | |
#define | BASEPASS "Password" |
Database password. | |
#define | PSQL_TYPESTR "PostgreSQL"; |
The text label that identifies the PostgreSQL driver. | |
Functions | |
DBConnection * | pg_dbconnection_free (DBConnection *dbc) |
Free the PostgreSQL connection. | |
char * | pg_DBform_to_url (Form *frm) |
void | pg_DBurl_to_form (Form *frm, char *url) |
Copy the login variables from a text URL to a form. | |
DBConnection * | pg_dbconnection_new () |
Allocate a new database connection, , with the included private DBConnection_PG data. | |
DBConnector * | register_PostgreSQL (void(*error_dialog)(char *, char *)) |
Register the PostgreSQL driver. |
Definition in file d_postgres_f.c.
|
Value: "SELECT a.attnum, a.attname, t.typname, a.attlen," \ "a.atttypmod, a.attnotnull, a.atthasdef\n" \ "FROM pg_class c, pg_attribute a, pg_type t\n" \ "WHERE c.relname = '%s' AND\n" \ "a.attnum > 0 AND\n" \ "a.attrelid = c.oid AND\n" \ "a.atttypid = t.oid\n" \ "ORDER BY attnum" |
|
Value: "SELECT d.adsrc\n" \ "FROM pg_attrdef d, pg_class c\n" \ "WHERE c.relname = '%s' AND\n" \ "c.oid = d.adrelid AND\n" \ "d.adnum = %s" |
|
Value: "SELECT usename, relname, relkind, relhasrules\n" \ "FROM pg_class, pg_user\n" \ "WHERE relkind = 'r' AND\n" \ "relname !~ '^pg_' AND\n" \ "relname !~ '^xin[vx][0-9]+' AND\n" \ "usesysid = relowner\n" \ "ORDER BY relname" |
|
Free the PostgreSQL connection.
Definition at line 88 of file d_postgres_f.c. References db_conn::pvt. |
|
Allocate a new database connection, , with the included private DBConnection_PG data.
Definition at line 589 of file d_postgres_f.c. References db_conn::pvt, and db_conn::pvtlen. |
|
Definition at line 390 of file d_postgres_f.c. References _a_buf::b_dat, BASEHOST, BASELOGIN, BASENAME, BASEPASS, buf_check(), buf_strcat(), buf_strcpy(), frm_get_title(), and frm_get_value_by_name(). Referenced by register_PostgreSQL(). |
|
Copy the login variables from a text URL to a form. URL format is "postgresql://[user[:pass]@]host[:port]/dbname"
Definition at line 470 of file d_postgres_f.c. References BASEHOST, BASELOGIN, BASENAME, BASEPASS, BASEPORT, frm_clear_fields(), and frm_set_value_by_name(). Referenced by register_PostgreSQL(). |