Add support for Postgres sequences
Answered
Datagrip doesn't seem to support the concept of Postgres sequences. Clicking on them reveals no data. They can't be edited. Copying them appears to do nothing?
Please sign in to leave a comment.
Hello David,
Not all native DB types are introspected right now, you can follow related issue in progress: https://youtrack.jetbrains.com/issue/DBE-367 .
Btw, do you see similar results: https://youtrack.jetbrains.com/issue/DBE-304 ? Can you attach sample ddl which is not properly detected? Thanks.
Im not quite experiencing the same as DBE-304. Right-clicking on the sequence and selecting "Copy DDL" doesn't add anything to my clipboard. It's blank. Well, I guess it's technically doing something as the contents of the clipboard are blank rather than what was previously copied.
Not to be confused with an empty table.
Can you please attach DDL for the table and the sequence which is not detected? Thank you in advance!
One of the frequent uses of PostgreSQL sequences editing is to adjust the next sequence number. Any time someone is doing data imports, the sequence number needs to be updated afterwards and currently there is no ability in the Database panel to update sequences. Also, in standard display mode of PostgreSQL databases, the sequences folder opens expand and not the table folder (which would be more useful, especially given there is no functionality for sequences currently).
I was also looking for sequence editing feature, which there isn't in DataGrip (2017.1.3) Postgres. As James Wallis Martin there pointed out it is sort of must feature with data imports. Also it's frustrating that you are able to see the sequences and menu hints that you could edit them also with "Sequence Editor". But in fact there is no such as "Sequence Editor".
Hi,
Try to update for DataGrip 2017.1.4.
Thank you.
DataGrip 2017.1.4 same thing as before. Pity, as otherwise DG is much better than the awful pgAdmin4.
Hi,
What do you mean under editor?
Since I can see sequence sources in sequence editor:
Thank you.
There is no way to use the gui of datagrip to create sequences as of June 2018.
Workaround: Use the sql command "create sequence name_of_sequence" to create your sequence. After command exectuion, datagrip will show it under "sequences" in the schema where you exectued the command.
Most of us need database functionality that is found in other IDE systems like in www.sqlmanager.net (which alas do not support Mac OS) so I see the opportunity for DataGrip to do the same in its GUI to allow us to quickly edit sequences, generate backups, restores, and DB comparisons. I hope JetBrains goes down this path, especially if more of us request these basic SQL features.
Using DataGrip 2024, this option is not available yet.
When you go to the "Modify Sequence" option, it should show the "last_value", "long_cnt" and "is_called" options in the window so you can change them graphically, which unfortunately does not happen :/
I can only do it via SQL, for example:
https://youtrack.jetbrains.com/issue/DBE-17093/Fix-sequence-start-value
Please follow this issue to stay updated on the progress.