does the file extension matter to DBeaver? - dbeaver

I have a SQL script file with the extension.pgsql
When I open it in DBeaver, it does not seem to recognise it as a SQL script and removes all options such as execute, etc...
If I change the extension from pgsql into sql, then everything is fine.
I do not have control over file extensions...
Is there a way to instruct DBeaver to treat .pgsql as SQL files?
PS: I am using DBeaver 5.3.4 under windows

Yes, the extension does matter and yes you can add file associations to treat .pgsql extensions as SQL files.
Go to File > Properties (Alt+Enter is default keybind). Then Click on Global Settings.
Navigate to General > Editors > File Associations.
Click Add and add .pgsql
Then add an associated editor that is an sql editor.

Related

Manage multiple YAML extensions

I have the Home Assistant extension installed in VSCode but also want to use the ESPHome extension, both of these are for YAML files.
I need a way of telling VSCode which extension to use.
I wonder if it is possible to configure VSCode to use a specific extension in a specified folder tree or else to put something in the YAML file itself so the extension can recognise that it should be effective for that YAML file.
If I understand your question correct, you want to select installed extensions for in your case; YAML files.
VSCode :
Home Assistant extension
ESPHome extension
Via 'exentension' > 'dis/enabled [workspace]', you can arrange it.
Workspace recommended extensions#
A good set of extensions can make working with a particular workspace or programming language more productive and you'd often like to share this list with your team or colleagues. You can create a recommended list of extensions for a workspace with the Extensions: Configure Recommended Extensions (Workspace) command.
Extra information SEE https://github.com/Microsoft/vscode/issues/19792
This option was moved into Command pallette (F1)

How to open a ansible include_task file in a role using vscode?

In our ansible role ,there is a main file which calls tasks from multiple files.
One of the sample task is given below
- name: Delete folder
include_tasks: folder_delete.yml
vars:
folder: "{{folder_name}}"
If i need to go to the file folder_delete.yml thne currently i am copying the file name folder_delete then use Ctrl+p then in it i am copying and open the file.
In other languages , If we click on function and click f12 ,it will go to definition. Like that in ansible extension ,is there any way to go to the file by using some shortcut? I am opening files many times, a shortcut will be a great help
Or is there a way to write that in some macro ?
I found an answer by myself but recording it for future user.
I used the Openfileatcursor extension . I select the file and type alt+d then it shows it in quick open. From there i am able to open it. This helps me a lot.
Also another extension named Openfile . This is even more useful, I have to select the file name and type Alt+p it will open the file

SQL Developer - Data Modeler extension is not displayed

I installed SQL developer sqldeveloper-18.3.0.277.2354-no-jre.zip nd when I access Help -> About in the extensions tab I cannot see the oracle.datamodeler extension. I can find the jar file in the extracted files though in sqldeveloper/extensions
Is there aything I can do to make it work?

SQL Developer won't show the connections Tab

So SQL Developer won't show the connections tab no matter what I do.
I've tried going through the "view" tab and clicking into the "connections" and I've also tried clicking the new button. I've also tried an uninstall/reinstall, but nothing.
It's probably something simple, but I'm fairly new to it, can anyone direct me or provide any advice?
Any help is really appreciated :)
You can go to the upper tab "WINDOW" and then click "Reset Windows to factory settings".
1.) Save your current SQL connection xml file located in windows 7/8/10: C:\Users\"youruseraccount"\AppData\Roaming\SQL Developer\systemXXXXX\o.jdeveloper.db.connection.xxxxxx
2.)Now delete your SQL Developer Folder and sqldeveloper folder located in: C:\Users\"youruseraccount"\AppData\Roaming\
3.)Now delete the main sqldeveloper folder containing the actual SQL developer application files.This would be located wherever you initially unzipped the SQLDeveloper download.
4.)Download the latest version of SQL Developer and unzip wherever you like.
5.)Launch SQL developer and specify your JDK location.
6.)Copy your connections xml file to your roaming SQL Developer directory here: C:\Users\"youruseraccount"\AppData\Roaming\SQL Developer\systemXXXXXX)\o.jdeveloper.db.connection.xxxxxx
7.)Launch SQL Developer and your DBA view should now be available after selecting view -> DBA
1 ) Select the Windows Menu
2 ) Choose the option Reset Windows to Factory Settings
3 ) Oracle SQL Developer automatically closed and reopened.
Search for the file - windowinglayoutDefault.xml and delete it, and restart SQL Developer.
This file should be present inside a system folder at
windowuserPath\AppData\Roaming\SQL Developer\
I had the similar issue with SQL Developer 4.2, one fine day all the connections pane on left vanished, tried couple options unsuccessfully.
Remedy is
1) Installation of newer version of SQL Developer to the folder of your choice with newer java JDK
2) Import the preference from previous version. DID the TRICK... Good Luck
Rajarao
For me, it worked in the following way:
I just deleted the folder where I had extracted the zip folder and then re-extracted it and then ran sqldeveloper.exe
I exported all my connection to a json file. Then imported the one disappeared and it worked.
This worked for me!!, No need of recreating the connections.

pgAdmin4 import file error - can't find file

I'm having a problem importing a csv file to pgAdmin4 on a mac - it simply can't find the file. This is so simple that I'm hoping there's just a setting I've failed to set up.
In the import/export data function on a table, there is the Import/Export dialog that looks like this:
However, it can't find the file:
That error looks like the standard python error when you give it the wrong path to a file. But it's correct - that's where the file is: '/tmp/person616.csv' - I didn't even enter the name/path, I browsed to it.
Has this happened to anybody else? Know how to fix it?
The exact problem has been bothering me for quite some days now. There are not much resources available to address it. So here's what I did:
I created a new folder giving it a strange name making sure that it is unique under the "/" directory and in the pgAdmin4 panel you're in rn.
I used below commands to find the new strange named folder that I just created: (i) sudo su (ii) find -iname [strange named folder] -type d
And after some time here it was. My path was revealed.
In my case, the path was
/var/lib/pgadmin/storage/[pgAdmin4_username]
I suspect that path for "PostgreSQL Binary Path" is not set properly in pgAdmin4.
In pgAdmin4 Goto:
File > Preferences > Paths > Binary paths > PostgreSQL Binary Path
Sample paths as below (You need to change it according to your Postgres location),
If you are using Windows than provide path like,
C:\Program Files\PostgreSQL\9.6\bin
If you are using Linux than provide path like,
/opt/PostgreSQL/9.5/bin
If you are using Mac than provide path where you have installed PG,
/Library/PostgreSQL/9.6/bin
And try again.
I just had the same problem and found the solution. PGAdmin4's root directory is not your root directory. It starts at
/home/[your_username]/.pgadmin/storage/[your PGAdmin_username]/
So if you put your file or backup directories there, it can find the files.
It also helps to have it show "all" files in the backup dialog, so it can find files with your own extensions. e.g. I use `filename.custom' which it doesn't recognize.
In pgAdmin, when you right-click on a database and click Restore, in the bottom-right corner of the mini-interface, just above the Select button, you can see Format 'dorpdown-list'. Make sure that the drop-down list isn't limiting your displayed files, so select All Files.
Right click on table > import/export >
Toggle "Import" mode > select file >
Upload Files then select each for every table