 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[11.5.362 Pro] - Picking a sequence from popup (Postgres) |
|
It's nice to have SA encapsulate the selected sequence when picking it from a popup but sometimes the resulting code is more of a hindrance than a help.
For example, when trying to drop a sequence,
 |
 |
DROP SEQUENCE "stage".nextval('"seq_obu_status_data"')
|
will not run.
Neither will work the following one when trying to select the next value from a sequence not from the current schema:
 |
 |
SELECT "stage".nextval('"seq_obu_status_data"');
|
In both cases, the schemas were expanded using the right arrow key, which, as I've been told in another topic a long time ago, inserts the schema and then reopens another popup. When the schema is expanded by clicking on the + sign the whole procedure happens in a single popup and only the schema_name.sequence_name is inserted, which is good for a DROP statement, but does not help the SELECT statement by encapsulating with the nextval function.
These codes are all auto-generated by SA when picking the sequence from the popup. Check the following short video here.
|
|
Tue Apr 20, 2021 1:44 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
In my test database I'm able to reproduce the nonsense code generated for DROP SEQUENCE. For select SELECT it appears similarly and also incorrect. I'm using factory default settings.
It looks like whenever it finds sequence selected in the popup, it always inserts ...nextval(...) without evaluating the context.

|
|
Tue Apr 20, 2021 2:49 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Here is the tracking issue number for this defect #SA0040783
As a short term workaround, please use drag and drop from DB Explorer to the editor to copy the sequence name.
|
|
Wed Apr 21, 2021 2:49 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|