You need to open the database before creating atoms; otherwise, the atoms that you create will conflict with those in the database. This is actually a design flaw, but until it is fixed, you have to live with it.
--linas On Thu, Sep 29, 2016 at 9:42 AM, <vishnupriya...@gmail.com> wrote: > Hello, > > When i do (pgsql-store), i get some error. > (use-modules (opencog) (opencog atom-types) (opencog persist-pgsql) > (opencog openpsi)) > (primitive-load "xxxxxx.scm") > (pgsql-open "fgf" "ccc" "dddd") > (pgsql-store) > (pgsql-close) > ---------------------------------------- > ...... > ... > ... > Error while executing the query > Query was: INSERT INTO Atoms (uuid, space, type, name, height, tv_type, > stv_mean, stv_count, stv_confidence) VALUES (367, 1, 8, $ocp$0.000000$ocp$, > 0, 1, 1, 0, 0); > Can't perform query rc=-1 (7) ERROR: duplicate key value violates unique > constraint "spaces_pkey"; > Error while executing the query > Query was: INSERT INTO Spaces (space, parent) VALUES (1, 1); > Can't perform query rc=-1 (7) ERROR: duplicate key value violates unique > constraint "atoms_type_name_key"; > Error while executing the query > Query was: INSERT INTO Atoms (uuid, space, type, name, height, tv_type, > stv_mean, stv_count, stv_confidence) VALUES (367, 1, 8, $ocp$0.000000$ocp$, > 0, 1, 1, 0, 0); > Can't perform query rc=-1 (7) ERROR: duplicate key value violates unique > constraint "atoms_type_out_hash_out_differentiator_key"; > Error while executing the query > Query was: INSERT INTO Atoms (uuid, space, type, height, out_hash, > out_differentiator, tv_type, stv_mean, stv_count, stv_confidence) VALUES > (370, 1, 13, 1, 4368330723998447496, 0, 1, 1, 0, > 0); > Can't perform query rc=-1 (7) ERROR: duplicate key value violates unique > constraint "atoms_type_out_hash_out_differentiator_key"; > Error while executing the query > Query was: INSERT INTO Atoms (uuid, space, type, height, out_hash, > out_differentiator, tv_type, stv_mean, stv_count, stv_confidence) VALUES > (370, 1, 13, 1, 4368330723998447496, 0, 1, 1, 0, > 0); > Can't perform query rc=-1 (7) ERROR: duplicate key value violates unique > constraint "atoms_type_out_hash_out_differentiator_key"; > Error while executing the query > Query was: INSERT INTO Atoms (uuid, space, type, height, out_hash, > out_differentiator, tv_type, stv_mean, stv_count, stv_confidence) VALUES > (366, 1, 15, 1, -1800332976553377133, 0, 1, 1, 0, > 0); > Can't perform query rc=-1 (7) ERROR: duplicate key value violates unique > constraint "atoms_type_out_hash_out_differentiator_key"; > Error while executing the query > Query was: INSERT INTO Atoms (uuid, space, type, height, out_hash, > out_differentiator, tv_type, stv_mean, stv_count, stv_confidence) VALUES > (366, 1, 15, 1, -1800332976553377133, 0, 1, 1, 0, > 0); > Finished storing 347 atoms total. > Reserving UUIDs up to 370 Atoms table max. > ----------------------------------------------------------- > > I think, Atoms in scm file are not stored. Each time i need to use > (primitive-load "xxxxxx.scm"). I have also attached a sample of my scm file. > > Thanks in advance. > > -- > You received this message because you are subscribed to the Google Groups > "opencog" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opencog+unsubscr...@googlegroups.com. > To post to this group, send email to opencog@googlegroups.com. > Visit this group at https://groups.google.com/group/opencog. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/opencog/009ed376-5968-491b-a285-f947940f948b%40googlegroups.com > <https://groups.google.com/d/msgid/opencog/009ed376-5968-491b-a285-f947940f948b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "opencog" group. To unsubscribe from this group and stop receiving emails from it, send an email to opencog+unsubscr...@googlegroups.com. To post to this group, send email to opencog@googlegroups.com. Visit this group at https://groups.google.com/group/opencog. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/CAHrUA34XsBXq-e_8QmJu1K3pL9kO9RzMUfb5kHmpHXWShEha%3DA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.