Make things play nice with PostgreSQL, tested with 9.1.1 and 9.2
This commit is contained in:
@ -199,7 +199,6 @@ int pgsql_drv_init(void)
|
||||
int pgsql_drv_describe(drv_caps_t *caps)
|
||||
{
|
||||
PGconn *con;
|
||||
(void)table_name; /* unused */
|
||||
|
||||
*caps = pgsql_drv_caps;
|
||||
|
||||
|
||||
@ -32,6 +32,16 @@ pad CHAR(60) DEFAULT '' NOT NULL,
|
||||
) /*! ENGINE = ]] .. mysql_table_engine ..
|
||||
" MAX_ROWS = " .. myisam_max_rows .. " */"
|
||||
|
||||
elseif (db_driver == "pgsql") then
|
||||
query = [[
|
||||
CREATE TABLE sbtest]] .. i .. [[ (
|
||||
id SERIAL NOT NULL,
|
||||
k INTEGER DEFAULT '0' NOT NULL,
|
||||
c CHAR(120) DEFAULT '' NOT NULL,
|
||||
pad CHAR(60) DEFAULT '' NOT NULL,
|
||||
]] .. index_name .. [[ (id)
|
||||
) ]]
|
||||
|
||||
elseif (db_driver == "drizzle") then
|
||||
query = [[
|
||||
CREATE TABLE sbtest (
|
||||
@ -48,8 +58,7 @@ pad CHAR(60) DEFAULT '' NOT NULL,
|
||||
|
||||
db_query(query)
|
||||
|
||||
|
||||
db_query("CREATE INDEX k on sbtest" .. i .. "(k)")
|
||||
db_query("CREATE INDEX k_" .. i .. " on sbtest" .. i .. "(k)")
|
||||
|
||||
print("Inserting " .. oltp_table_size .. " records into 'sbtest" .. i .. "'")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user