Open qwesda opened 8 years ago
Jacob, please add an IN
option! If there's just one thing in the next release, then let this be it. Awesome software. Thank you!
I agree with this. I'm finding myself needing to use Custom SQL
with IN
more and more often. If you need any help developing or testing this, I'd be glad to contribute my time.
Would love this as well 🙏
I found myself wanting this today too. Would be very nice to have.
this is a 6-year-old request. why it hasn't been addressed yet.
@daniel-refahi because software development is a difficult task of managing the importance of a myriads of feature improvements, bug fixes and other issues. If you want this feature then give it a thumbs up so the developer can see how many people are interested in it.
@espen A valid point, however, this simple issue has been number 5 on the README Top 10 priorities list since Feb 2020 (not updated since then). I can understand a little frustration that this issue doesn't appear to have had a developer response in all this time, especially given this is paid software with an upgrade on the horizon. Why should people think upvoting issues makes any difference at this point?
Edit: This issue is now number 2 on the current sorting: https://github.com/jakob/Postico/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc
I would love this as well!
Since this request is so popular, I've decided to take the time to add an "is in list" and "is not in list" filters to Postico 2. You can try them by downloading the latest development build: https://releases.eggerapps.at/postico2/changelog?update_channel=1
I think this filter is so useful that I've made it the default when selecting "Filter Rows by column name..." from the context menu.
As a little gimmick, Postico also offers autocomplete for ENUM fields when using the IN filter. After testing it a bit, I consider this feature a 1000% improvement and I concede I should have added it much sooner.
Please test it! I would love to hear your thoughts!
very nice!
nitpicks:
text
columnsVery useful with autocomplete for enums! And great to see IN as filter option. Thanks.
I like this as the default filter option. As with #824 I have found that LIKE being the default filter is problematic for performance (and also usability, I normally want to do an exact match).
pasting tab separated and newline separated values (and maybe ; separated) should also work
Good point, I'll see if I can change that
I would stick with contains for
text
columns
The reason why I changed it is because people are complaining about performance (accidentally applying a contains
filter to a big table takes a long time). Do you think it makes sense to differentiate between TEXT and VARCHAR? I personally use VARCHAR for short strings (where "is in list" often makes more sense), and TEXT for long text (where "contains" would make more sense). Is that common usage, or just me.
the visual margins in the autocomplete popup are a bit off
I'm using NSTokenField, which does 99% of what I want, but customising it is unfortunately difficult.
We'll my opinion about the default option is not too strong. I personally have gotten used to the default text filter being LIKE '%$term%'
and use it quite often. But I also know about the performance implications of it and don't start queries that are too ambitious. My guess would be that you will get a different group of people complaining if you change the current behaviour. Some simply because you change something and some because the old behaviour better fits their use-case.
I think distinguishing between text
and varchar
would be hard to discover or make sense of for most users. I personally use text
exclusively. I read about the differences of the text types in PG after switching from mysql and the general consensus seemed to be "just use text".
If NSTokenField
is too stubborn then don't wast too much time on it ... the functionality is more important than some visual quirks.
In the latest dev build I've made the following changes:
I think this is a good balance. For small tables, the convenient "any column contains" filter is still the default, and for those who use Postico to search very large tables, it's less likely that they will accidentally use the "contains" filter.
I will test the new release as soon as I have time ... in the meantime I stumbled across this issue:
the contains
filter seems to be completely gone for the uuid
type – I kind of need it though ... I'm using uuidv7
meaning the beginning part of the uuids are all very similar and the end parts are very distinct. I'm using the last 12 chars of the uuid (i.e. the random part) to generate partition names (the default max table name length is 63 chars ...).
So sometimes I have a legitimate use case for contains
for uuid fields. I also think begins/ends with
could be useful to somebody. I doesn't need to be the default, but the options should be available.
@qwesda The contains
filter on UUID has been gone for some time already (see #765 and #184). I guess the begins with
case could be handled with a >= and a <= filter, which would have the advantage of being very fast (at least for BTREE indexed columns).
Very possible that this is unrelated to the IN
thing. But still sometimes it is useful.
Should I open a new issue for this?
@qwesda Yes, please open a new issue. Your use case sounds useful, but it's a bit hard to implement at the moment.
+1
It would be nice to have an
IN
filter as an option when filtering table data.1,2,3
should lead to"my_column" IN (1,2,3)
foo,bar,3,'hello, you'
should lead to"my_column" IN ('foo', 'bar', '3', 'hello, you')
extra points: