- postgres@T09:~/data> createdb -h /data/pgsql/data/ kyle
- postgres@T09:~/data> psql -h /data/pgsql/data/ kyle
- psql (9.1.0)
- Type "help" for help.
- kyle=# CREATE TABLE t1(id integer not null, sl
float8 not null,primary key(id));
- NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t1_pkey" for table "t1"
- CREATE TABLE
- kyle=# insert into t1 values(1,10);
- INSERT 0 1
- kyle=# insert into t1 values(2,20);
- INSERT 0 1
- kyle=# insert into t1 values(3,30);
- kyle=# SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE;
- SET
-- 上面是创建一个实验表和三条实验记录,并且将SESSION
A连接的事务隔离级别设置成SERIALIZABLE