Avoid columns being displayed with their maximum width in the data output tab in pgAdmin - pgadmin-4

In pgAdmin4 (version 5.5), when a SELECT * FROM tablename; query is executed, one can see on the bottom panel, under a tab called "Data Output", the resulting records for the selected columns for the specified table.
If this table is having columns with very long string of data, e.g when encoded as JSON objects, or any PostGIS complex geometries, their width can be extraordinarily large, which affects the user experience negatively. Because going to some of the columns becomes a sub-pixel game when one try to grab and move the tiny horizontal slider (e.g. moving the slider half a pixel can move several columns by more than 2x the width of the screen...).
Did I miss something in the settings?
Is there a way to fix that, e.g. by setting a maximum width value for the columns? Because when using pgAdmin out-of-the-box, they are fully expanded...
I remember that is was not the case in earlier versions (4.x).
I'm using the latest dockerized version (5.5) as documented on the pgAdmin4 doc and available here: https://hub.docker.com/r/dpage/pgadmin4/
OS: Ubuntu 18.04
Web Browser: Firefox 89.0.2 (64-bit)

You can set the maximum width value for columns under File -> Preferences -> Query tool -> Results grid
Max column width setting pgAdmin 4

In the newest version of PG Admin v6 (6.7 as of 3/18/22) they changed this yet again. It is in the same place, but the option no longer lets you set the width. There is just a radio option to have super wide columns or base the width off of the column name
Preferences Screen PG admin 6.7

I am using PostgreSQL 11.17
Go to File menu > click on Preferences
From Preferences window scroll down to Query tool
From the list under Query Tool > click on result grid
Select Column name in the Columns sized by field
Click save
Reopen the table you were having issue with due to column width

Related

How can I Filter Data in Google Data Studio based on containing 2 or more input options?

I'm building a dashboard for a dataset that includes a Location column, and I would like the user to be able to filter based on location. The trouble is that some projects are happening in multiple locations, so that the column is comma separated list of locations, making the normal dropdown filter option cumbersome ("NY, Paris" and "Paris, NY" are treated as different values). While this can be overcome by adding a parameter dropdown box and allowing the user to select an option (say Paris) and then using a Contains function to filter the output, the Parameter drop down box only allows 1 selection to be made. So a search for all project happening in either Paris or New York seems like it would have to be done using 2 separate parameters. Is anyone aware of an elegant workaround for this that will allow multiple selections of locations within a single dropdown.
The inelegant solutions I've come up with are:
Use n parameter boxes and cap the locations that can be filtered in a single view at n.
Have users input a comma separated list as a parameter, parse that for locations and then show all REGEXP CONTAINS matches of that provided list.
Example dataset showing multiple locations per project in the locations column:
Edited to add a link to a sample report here. The problem, in a nutshell is that I would like people to be able to select 2 or more location parameters so that they don't have to limit themselves to viewing 1 location at a time.
One way to filter CSVs (Comma Separated Values) is by using the CSV Filter Control Community Visualisation (click on the icon on the toolbar and select to view all):
Data Tab
Column to filter on: Location
Cross-filtering: Select (☑) (this ensures that the CSV Filter Control filters other charts based on the value(s) selected)
Style Tab
OR instead of AND behaviour: Select (☑)
Editable Google Data Studio Report (Embedded Google Sheets Data Source) and a GIF to elaborate:

SqlServer Management Studio - Edit Top 200 - Max length of fields

I've a table with an nvarchar(MAX) column containing text formatted as Json of various length, around 15000; 2 records have a length of 53000 in that column and these are not shown using the "Edit top 200" command, but are shown using a Select query in a standard window.
Is there a length limit on the columns that is possible to read and edit using the "Edit top 200" command in Sql server management? I'm pretty sure there's a limit, but I can't find references about that in the documentation and I'd also expect some message in the field, a placeholder like "your data is too long to be shown here". Having just the field empty could be a little bit confusing.
Sql server 14.0.2037; Management studio 15.0.18390.0
Thanks

Spatial Results Tab window not available in Microsoft Visual studio

I cannot see the 'spatial results' tab window when i run the query below.When i run a normal query i can see 2 tabs showing 'results' and 'message' but not the 'spatial results' tab. I am using Microsoft visual studio2017(ssdt).The codes below works fine but it displays the columns as text and coordinates but not in a grid format.Can someone tell me how to get the spatial results tab.Is there something that i need to download.Please advise.
Create table [Spatialinfo]
(id INT,spatialdata geometry,shape Varchar(10));
INSERT INTO [spatialinfo]
(spatialdata)
VALUES ('Point(7 12)');
Select * From Spatialinfo;
The result that i get is something approximately as follows in the message window.
id spatialdata shape
1 0x000010c0000022400000002840 null
"The codes below works fine but it displays the columns as text and coordinates but not in a grid format"
The documentation explicitly states that if you are returning your results as text, you will not get the Spatial Results Pane. Spatial Results Window:
Note
The Spatial results window is only available if your results are
returned to a grid in the Results window. If you specify that your
results are returned as text, this window is not available.
You need to return your results in the Grid View to see the Spatial Results Window.

How to allow user to set a column's max width to infinite?

I have a Ext.Grid.GridPanel containing columns.
Problem is that, as an user, I can expand columns just by a predetermined width.
For example if the column width is 50 I can go only up to 80.
And I noticed another strange thing: the more I add columns to my Ext.grid.GridPanel, the less is the amount of space which I can expand my column to!
Is there a way to solve this problem?
edit:
my version is 5.0.0
Solved! It seems to be a bug related to version 5.0.0.
I just used versione 5.1.0 and everything worked fine

SSRS Chart: Filtering and controlling axis maximum

I am creating a chart off in SSRS based on software version usage per month. I would like to compare how often each version is used per month in comparison to other versions. The image I'm working with is below:
Obviously with one version being used so highly, it visually skews my data, making the rest of the data harder to see. I am curious if there is any way to do the following things in SSRS:
Having the user Toggle /select/choose which versions they would like to appear on the chart, with the chart then automatically adjusting its Y-Axis settings
Having the user adjust the y-axis settings themselves, thus being able to get a closer look or a zoomed out look of the data.
There are a few questions here.
Here's my base report:
Parameter-based axis
You can definitely set axis limits with a parameter. I created a parameter called AxisLimit and set Maximum property to use this parameter under Axis Options -> Set axis scale and style:
Works as required:
Filtering by parameter
You can also set up the report to filter values based on a user selection.
You can apply this to the DataSet in the query text or as a parameter to an underlying stored procedure.
If you need the data elsewhere in the report and can't apply this at the DataSet level, you can set up a filter at the chart level. I set up a multi-value parameter called Groups which contains the groups in the DataSet.
At the report I set the filter as:
Where the expression is:
=IIf(InStr(Join(Parameters!Groups.Value, ",")
, CStr(Fields!grp.Value)) > 0
, "INCLUDE", "EXCLUDE")
Here I use the Join function to get the list of selected parameters values, then filter the DataSet based on these. Again, works as required:
Scale breaks
One option you might not have considered is Scale Breaks, which is meant to help with this sort of data:
Maybe this will help, too.

Resources