Global symbol "$dbh" requires explicit package name at bbs3.cgi line 33. Global symbol "$sth" requires explicit package name at bbs3.cgi line 34. Scalar found where operator expected at bbs3.cgi line 34, at end of line (Missing operator before ?) syntax error at bbs3.cgi line 34, near "'INSERT INTO message VALUES ('$msg" String found where operator expected at bbs3.cgi line 34, near "$msg')'" (Missing operator before ')'?) Execution of bbs3.cgi aborted due to compilation errors.
>>538 PostgreSQLなら、 select oid,* from a; でoidを得ることができるよ。 詳しくはドキュメント読みましょう。
540 :536=538 :01/11/24 19:44
>>539 御教授大変ありがとうございます。
ドキュメントを改めて読んだ結果、 begin; lock table a in exclusive mode; select なんとか from a where なんとか; (select の結果に応じて)insert into a なんとか; commit; とかやって、同じ行ができないように することにしました。
以下実行結果。 db=# insert into a values (1,0); INSERT 18979 1 db=# insert into a values (1,0); ERROR: Cannot insert a duplicate key into unique index a_b_key db=# insert into a values (1,1); INSERT 18981 1