pg2docbook: - PostgreSQL-COMMENT to DocBook conversion | ||
---|---|---|
Prev |
This text is located in start.sgml and is just a general description of the application databases.
Date: 2000-12-31.
COMMENT ON DATABASE mydb IS 'Write comment here'
COMMENT ON TABLE customer IS 'Write comment here'
COMMENT ON TABLE inventory IS 'Write comment here'
COMMENT ON VIEW custview IS 'Write comment here'
CREATE VIEW custview AS 'SELECT * FROM customer WHERE name=''John'''
COMMENT ON VIEW invenview IS 'Write comment here'
CREATE VIEW invenview AS 'SELECT * FROM inventory WHERE name=''Chair'''
COMMENT ON FUNCTION getid(text) IS 'Write comment here'
CREATE FUNCTION getid(text) RETURNS INT4 AS ' DECLARE p_name ALIAS FOR $1; id INT4; BEGIN SELECT custid INTO id FROM customer WHERE name=p_name; IF NOT FOUND THEN RETURN 0; END IF; RETURN id; END; ' LANGUAGE 'PGplSQL'; |