Revision 2099
Added by Matt Jones about 20 years ago
xmltables_postgres.sql | ||
---|---|---|
1 |
/* |
|
2 |
* xmltables-postgres.sql |
|
3 |
* : Create or replace tables for storing XML in PostgreSQL |
|
1 |
/** |
|
2 |
* '$RCSfile$' |
|
3 |
* Copyright: 2004 Regents of the University of California and the |
|
4 |
* National Center for Ecological Analysis and Synthesis |
|
4 | 5 |
* |
5 |
* Purpose: creates tables needed for storing XML in PostgreSQL database |
|
6 |
* |
|
7 |
* Created: 08 May 2001 |
|
8 |
* Author: John Harris |
|
9 |
* Organization: National Center for Ecological Analysis and Synthesis |
|
10 |
* Copyright: 2000 Regents of the University of California and the |
|
11 |
* National Center for Ecological Analysis and Synthesis |
|
12 |
* For Details: http://www.nceas.ucsb.edu/ |
|
13 |
* File Info: '$Id$' |
|
6 |
* '$Author$' |
|
7 |
* '$Date$' |
|
8 |
* '$Revision$' |
|
14 | 9 |
* |
10 |
* This program is free software; you can redistribute it and/or modify |
|
11 |
* it under the terms of the GNU General Public License as published by |
|
12 |
* the Free Software Foundation; either version 2 of the License, or |
|
13 |
* (at your option) any later version. |
|
14 |
* |
|
15 |
* This program is distributed in the hope that it will be useful, |
|
16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
* GNU General Public License for more details. |
|
19 |
* |
|
20 |
* You should have received a copy of the GNU General Public License |
|
21 |
* along with this program; if not, write to the Free Software |
|
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
*/ |
|
24 |
|
|
25 |
/* |
|
15 | 26 |
* this is sql script does the same as the sql script named |
16 | 27 |
* xmltables.sql except that this script is to be use to |
17 | 28 |
* create the database tables on a Postgresql backend rather |
... | ... | |
259 | 270 |
); |
260 | 271 |
|
261 | 272 |
/* |
262 |
*Logging -- table to store metadata and data access log |
|
273 |
* Logging -- table to store metadata and data access log
|
|
263 | 274 |
*/ |
264 | 275 |
CREATE SEQUENCE access_log_id_seq; |
265 | 276 |
CREATE TABLE access_log ( |
266 |
entryid INT8 default nextval ('access_log_id_seq'), |
|
267 |
ip_address VARCHAR(512), |
|
268 |
principal VARCHAR(512), |
|
277 |
entryid INT8 default nextval ('access_log_id_seq'), -- the identifier for the log event
|
|
278 |
ip_address VARCHAR(512), -- the ip address inititiating the event
|
|
279 |
principal VARCHAR(512), -- the user initiiating the event
|
|
269 | 280 |
docid VARCHAR(250), -- the document id # |
270 | 281 |
rev INT8, -- the revision number |
271 |
event VARCHAR(512), |
|
272 |
date_logged TIMESTAMP, |
|
282 |
event VARCHAR(512), -- the code symbolizing the event type
|
|
283 |
date_logged TIMESTAMP, -- the datetime on which the event occurred
|
|
273 | 284 |
CONSTRAINT access_log_pk PRIMARY KEY (entryid) |
274 | 285 |
); |
Also available in: Unified diff
Modified SQL scripts to add the new access_log table. I've partially tested this under postgres but have not yet tested under oracle.