Skip to content

Instantly share code, notes, and snippets.

@runejuhl
Created August 9, 2012 15:08
Show Gist options
  • Save runejuhl/3305008 to your computer and use it in GitHub Desktop.
Save runejuhl/3305008 to your computer and use it in GitHub Desktop.
boss_db unique constraint
4> T = tag:new(id, "erlang", false).
{tag,id,"erlang",false}
5> T:save().
{error,{error,error,<<"23505">>,
<<"duplicate key value violates unique constraint \"tags_name_key\"">>,
[{detail,<<"Key (name)=(erlang) already exists.">>}]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment