Postgres automatic insert time stamp with time zone (india)
Actually, I want to give a comment about your question. I can't to do that because I have low reputation here. So, I decided to answer whether it fits with your question or not.

Let's I start. Would you like determine "query is inserted" first?

I have an assumption about your "query is inserted". "Query is inserted" is every query is inserted or affected on database (it could be insert, update, delete, etc.) that will be noted in log. Log here means log table where the trigger handles every query. OK. I give you clear explanation by an example below.

First, make a definition of log table like this,

CREATE TABLE query_log (
    log_id SERIAL PRIMARY KEY,
    log_timestamp TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
    action VARCHAR(20) NOT NULL
);


Action column above determines whether query performed by someone (for example when someone do insert, so the action column will be "insert" and so on). Then, we have to make a trigger to handle what we write on log table. It depends on table what affected by query. For example, we do query on table query. So,

CREATE TRIGGER add_insert_query_log
AFTER INSERT ON name_of_table
FOR EACH ROW
EXECUTE PROCEDURE insert_query_log();


and

CREATE OR REPLACE FUNCTION insert_query_log() RETURNS TRIGGER AS 
$$
BEGIN
   INSERT INTO query_log VALUES (currval(log_id)), DEFAULT, 'insert');
   RETURN NEW;
END
$$ LANGUAGE 'plpgsql';


You can continue with another function for update, delete, and etc or you can combine all of them in one function.