File: reports-pgsql.sql

package info (click to toggle)
phppgadmin 3.5.2-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,552 kB
  • ctags: 5,060
  • sloc: php: 50,620; makefile: 185; sh: 150; sql: 15; awk: 8
file content (26 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- SQL script to create reports database for PostgreSQL
-- 
-- To run, type: psql template1 < reports-pgsql.sql
--
-- $Id: reports-pgsql.sql,v 1.3 2003/10/23 08:32:20 chriskl Exp $

CREATE DATABASE phppgadmin;

\connect phppgadmin

CREATE TABLE ppa_reports (
	report_id SERIAL,
	report_name varchar(255) NOT NULL,
	db_name varchar(255) NOT NULL,
	date_created date DEFAULT NOW() NOT NULL,
	created_by varchar(255) NOT NULL,
	descr text,
	report_sql text NOT NULL,
	PRIMARY KEY (report_id)
);

-- Allow everyone to do everything with reports.  This may
-- or may not be what you want.
GRANT SELECT,INSERT,UPDATE,DELETE ON ppa_reports TO PUBLIC;
GRANT SELECT,UPDATE ON ppa_reports_report_id_seq TO PUBLIC;