Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You said, "ThreadedComment does not have a unique primary key of its own, relying on Object's promary [sic] key ('ID')." Django requires one field to be identified as a primary key. See <a href="http://docs.djangoproject.com/en/dev/topics/db/models/#automatic-primary-key-fields" rel="nofollow">Automatic primary key fields</a>.</p> <p><strong>More details . . .</strong></p> <p>The function pg_get_serial_sequence() returns the name of the sequence used by a specific column. So the following statement means, "Get the name of the sequence used for the 'id' column in the table 'threadedcomments_threadedcomment', set the sequence's last_value field to 1, and return 1 the next time nextval() is called.</p> <pre><code>SELECT setval(pg_get_serial_sequence('"threadedcomments_threadedcomment"','id'), 1, false); </code></pre> <p>But this statement</p> <pre><code>SELECT setval('"threadedcomments_threadedcomment_id_seq"', 1, false); </code></pre> <p>means, "Set the last_value field of the sequence named 'threadedcomments_threadedcomment_id_seq' to 1, and return 1 the next time nextval() is called."</p> <p>My guess is that the algorithm Django uses to name sequences changed between versions. I've seen other systems make similar changes because identifiers built up by concatenating table and column names became too long. I think Oracle identifiers have a 30-character limit; your identifier is 39 characters. I've seen Rails generate 70+ character identifiers, which break on PostgreSQL (63 or 64 character limit).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload