最佳答案
我的问题很简单。我知道一个UUID的概念,我想生成一个引用每个“项目”从一个“商店”在我的DB与。似乎很合理,对吧?
问题是下面这行返回了一个错误:
honeydb=# insert into items values(
uuid_generate_v4(), 54.321, 31, 'desc 1', 31.94);
ERROR: function uuid_generate_v4() does not exist
LINE 2: uuid_generate_v4(), 54.321, 31, 'desc 1', 31.94);
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
我已经阅读了页面:http://www.postgresql.org/docs/current/static/uuid-ossp.html
我在Ubuntu 10.04 x64上运行Postgres 8.4。