Comments (9)
from dbeaver.
This seems pretty clearly related to the bug I reported here. I'm attaching an additional screenshot in hopes of clarifying that "Blank line as a statement delimiter" has no effect under certain conditions. Also, the outline view (which I just learned about, thanks to this post) even shows that the parser doesn't correctly parse these as separate statements.
from dbeaver.
I can't reproduce your issue on the provided query script neither with Blank line is statement delimiter
set to Smart
, nor to Never
on DBeaver 24.0.4.
from dbeaver.
Could you open Outline view and show it to me?
It can be opened here by clicking this button
from dbeaver.
I don't see something wrong here. Outline shows that statements are correctly separated.
About the second screenshot I could say that lines 1040-1091 does have any features allowing statement delimiter logic to treat them as independent queries to separate from the surrounding parts of the script. So it's not valid to keep them here while using smart mode. Either comment them out, or switch Blank line is statement delimiter
to Always
, so that it would be enough to have a blank line to separate them - this way DBeaver will assume any text fragment surrounded with empty lines as a separate statement, preventing undesired behavior in this case.
from dbeaver.
@E1izabeth I often have multiple statements with no black spaces between them, see example below.
I expect Dbeaver to only use the delimiters to, well, delimite commands. If I place my cursor within the third line, I expect that only the third line will be executed.
Dbeaver should, and used to, only run the SQL statement that my cursor was within.
How do I get back to that behavior?
thanks,
rik.
For example:
-- create tables
create table rxnorm.rxnatomarchive_20240205 as table rxnorm.rxnatomarchive;
create table rxnorm.rxnconso_20240205 as table rxnorm.rxnconso;
create table rxnorm.rxncui_20240205 as table rxnorm.rxncui;
-- create the indicies
create index if not exists x_rxnconso_str on rxnorm.rxnconso (str);
create index if not exists x_rxnconso_rxcui on rxnorm.rxnconso (rxcui);
create index if not exists x_rxnatomarchive_rxcui on rxnorm.rxnatomarchive (rxcui);
create index if not exists x_rxnatomarchive_merged_to on rxnorm.rxnatomarchive (merged_to_rxcui);
-- drop tables
drop table if exists rxnorm.rxnatomarchive_20240102;
drop table if exists rxnorm.rxnconso_20240102;
drop table if exists rxnorm.rxncui_20240102;
drop table if exists rxnorm.rxncuichanges_20240102;
Or:
-- list roles
select usename as username,
case
when usesuper then
cast('superuser' as pg_catalog.text)
else
cast('No user' AS pg_catalog.text)
end user_attribute
from pg_catalog.pg_user
order by username asc;
from dbeaver.
Thank you for more examples. All of them works right for me on version 24.0.4. We have a bug in 24.0.3, but now it's fixed. I cannot reproduce the behavior you're describing.
from dbeaver.
You can change this setting to Always. It should help
from dbeaver.
from dbeaver.
Related Issues (20)
- Opening a procedure via the command line HOT 1
- MySQL database dump with --force option still stops on errors HOT 1
- Dump Database not functioning HOT 2
- Cannot save changes to stored procedures through data editor
- Add a connection to Microsoft Dynamics 365 HOT 3
- (Postgres and Oracle) Advanced Copy as JSON, wrong value when copying date-like types
- Prevent auto upper casing of keywords in comments HOT 1
- Store secrets using Secret Service API on Linux
- Add toggle to switch between names and labels of fields during export to JSON HOT 1
- semicolon removed at the end of the line HOT 1
- Corrupt UI components after fresh install of v24.0.4 HOT 2
- Can't edit data in Derby HOT 1
- Order by clause is invalid when using filtering
- [DuckDB] Can't update data in data grid
- MySQL Connector 8.2.0 issue HOT 6
- divide the parameters of functions and procedures into two tabs into input and return parameters HOT 1
- [Eclipse] Errors when creating new column HOT 1
- Minor translation issue with German translation "Zeigen alle Datenbanken an" HOT 1
- Data transform can't invert coordinates
- New Client Side Command: @Clear to clean up the output window HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbeaver.