Skip to content

能增加对postgresql数据库的支持吗? #10

Description

@lvbuwei

我现在所有的服务器都用postgresql,对postgresql比较熟悉,我试着增加对postgresql的支持,装了pgmoon模块,也可以连上数据库,但是后面报错,因为对lua也不是很熟悉,不知道作者能否增加对postgresql数据库的支持。希望您能增加对postgresql的支持,我做测试,如果您愿意增加,请联系我的
qq 171958445,我帮您测试。

安装pgmoon包.

下面的postgresql 为建表的SQL语句。

CREATE TABLE agw_api (
id serial PRIMARY KEY,
service_id int DEFAULT NULL,
request_uri varchar(64) DEFAULT NULL,
original_uri varchar(64) DEFAULT NULL,
uri_limit_seconds int NOT NULL DEFAULT '0',
uri_limit_times int NOT NULL DEFAULT '0',
ip_uri_limit_seconds int NOT NULL DEFAULT '0',
ip_uri_limit_times int NOT NULL DEFAULT '0',
description varchar(128) DEFAULT NULL
);
INSERT INTO agw_api (service_id, request_uri, original_uri, description) VALUES
( 1, '/', '/', 'all request map');
CREATE TABLE agw_domain (
id serial PRIMARY KEY,
name varchar(255) NOT NULL
);
INSERT INTO agw_domain (name) VALUES
('localhost');
CREATE TABLE agw_server (
id serial PRIMARY KEY,
service_id int DEFAULT NULL,
ip varchar(64) DEFAULT NULL,
port int DEFAULT NULL,
protocol varchar(32) NOT NULL DEFAULT 'http://',
weight int DEFAULT NULL,
status int DEFAULT 1,
description varchar(255) DEFAULT ''
);
INSERT INTO agw_server (service_id, ip, port, protocol, weight, status, description) VALUES
( 1, '127.0.0.1', 8081, 'http://', 1, 1, 'proxygateway management');
CREATE TABLE agw_service (
id serial PRIMARY KEY,
domain_id int NOT NULL,
name varchar(64) DEFAULT NULL,
host varchar(255) NOT NULL DEFAULT '',
description varchar(64) DEFAULT NULL
);
INSERT INTO agw_service (domain_id, name, host, description) VALUES
( 1, 'default', 'localhost', 'default proxy configuration');

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions