mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
This fixes some text as well as enforces the use of "drop table cascade"
since we moved from an implicate to explicate implementation. Greg Copeland
This commit is contained in:
parent
4f1ac055f1
commit
1991fe74e1
@ -9,7 +9,7 @@ MODULE FUNC.PY : SQL FUNCTION DEFINITION TUTORIAL
|
|||||||
This module is designed for being imported from python prompt
|
This module is designed for being imported from python prompt
|
||||||
|
|
||||||
In order to run the samples included here, first create a connection
|
In order to run the samples included here, first create a connection
|
||||||
using : cnx = advanced.DB(...)
|
using : cnx = func.DB(...)
|
||||||
|
|
||||||
The "..." should be replaced with whatever arguments you need to open an
|
The "..." should be replaced with whatever arguments you need to open an
|
||||||
existing database. Usually all you need is the name of the database and,
|
existing database. Usually all you need is the name of the database and,
|
||||||
@ -189,13 +189,13 @@ def demo_cleanup(pgcnx):
|
|||||||
print "DROP FUNCTION add_em(int4, int4)"
|
print "DROP FUNCTION add_em(int4, int4)"
|
||||||
print "DROP FUNCTION one()"
|
print "DROP FUNCTION one()"
|
||||||
print
|
print
|
||||||
print "DROP TABLE EMP"
|
print "DROP TABLE EMP CASCADE"
|
||||||
pgcnx.query("DROP FUNCTION clean_EMP()")
|
pgcnx.query("DROP FUNCTION clean_EMP()")
|
||||||
pgcnx.query("DROP FUNCTION high_pay()")
|
pgcnx.query("DROP FUNCTION high_pay()")
|
||||||
pgcnx.query("DROP FUNCTION new_emp()")
|
pgcnx.query("DROP FUNCTION new_emp()")
|
||||||
pgcnx.query("DROP FUNCTION add_em(int4, int4)")
|
pgcnx.query("DROP FUNCTION add_em(int4, int4)")
|
||||||
pgcnx.query("DROP FUNCTION one()")
|
pgcnx.query("DROP FUNCTION one()")
|
||||||
pgcnx.query("DROP TABLE EMP")
|
pgcnx.query("DROP TABLE EMP CASCADE")
|
||||||
|
|
||||||
# main demo function
|
# main demo function
|
||||||
def demo(pgcnx):
|
def demo(pgcnx):
|
||||||
|
Loading…
Reference in New Issue
Block a user