Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3231384
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:02:21+00:00 2026-05-17T17:02:21+00:00

I am currently working with some of my teacher’s old Postgres SQL code and

  • 0

I am currently working with some of my teacher’s old Postgres SQL code and modifying it to match what I need. However, there is one piece of code that I can’t seem to find an explanation of anywhere online. In the code he had a case statement with a ~~* used as what looked like a comparison. I am unfamiliar with this syntax and would greatly appreciate any help. Thanks in advance.

CASE
        WHEN sessions.status ~~* 'data%finder%'::text THEN ((sessions.minutes_in_data_ || ' ('::text) || sessions.minutes_in_idle) || ')'::text
        WHEN sessions.status ~~* 'text%edit%'::text THEN ((sessions.minutes_in_text_editor || ' ('::text) || sessions.minutes_in_idle) || ')'::text
        WHEN sessions.status ~~* 'admin%module%'::text AND sessions.minutes_in_module<> 0 THEN ((sessions.minutes_in_module|| ' ('::text) || sessions.minutes_in_idle) || ')'::text
        WHEN sessions.status ~~* 'client%module%'::text AND sessions.minutes_in_module<> 0 THEN ((sessions.minutes_in_module|| ' ('::text) || sessions.minutes_in_idle) || ')'::text
        ELSE NULL::text
    END AS "Duration (Idle)",
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:02:21+00:00Added an answer on May 17, 2026 at 5:02 pm

    They are equivalent to like/ilike:

    From the documentation

    The operator ~~ is equivalent to LIKE,
    and ~~* corresponds to ILIKE. There
    are also !~~ and !~~* operators that
    represent NOT LIKE and NOT ILIKE,
    respectively. All of these operators
    are PostgreSQL-specific.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working with parsing some data from SQL Server and I'm in need
I'm currently working on some quite old C++ code and often find things like
I'm currently doing something like this in some code I'm working on right now:
I am currently working on some older java code that was developed without App
I am currently working on some Ajax heavy code and I am wondering how
I'm currently working on some straight up assembly code on Ubunutu. I was wondering
I'm currently working on some C program, and I'd like to know if there's
I'm currently working on some logging code that supposed to - among other things
I am currently working on reimplementing some algorithm written in Java in Python. One
I'm currently working on a system that in some cases will need to run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.