John Hardin wrote:
> Well, absent implementing native support for the "inet" data type in Squirrel/JDBC, what does this return?
>
> select CAST(ip AS varchar(20)), count(ip)
> from reports
> group by ip
> order by count(ip) desc
That returns a much improved:
ip,count
10.1.2.12/32,23
10.1.2.163/32,21
10.1.2.97/32,15
10.1.2.56/32,9
And by extension, I could get back to the base behavior of pgAdmin and psql with the following:
select regexp_replace(CAST(ip AS varchar(20)), '/\\d{1,2}', ''), ...
But it's a little daunting to think of rewriting any SQL I want to use in Squirrel to that extent. I had been rather hoping I was simply missing a driver property checkbox or the like.
Thank you, John, that's very helpful even if not what I was hoping to hear!
The information in this message is for the intended recipient(s) only and may be the proprietary and/or confidential property of Litle & Co., LLC, and thus protected from disclosure. If you are not the intended recipient(s), or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this communication is prohibited. If you have received this communication in error, please notify Litle & Co. immediately by replying to this message and then promptly deleting it and your reply permanently from your computer.
|