From: | Dane Foster <studdugie(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | A table of magic constants |
Date: | 2015-07-11 19:07:52 |
Message-ID: | CA+Wxin+7jvN2NqE67HyhfvXJ3xBkeU9Fa4m-Tgv8-szBM4wOtg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
My reason/excuse for asking what I'll eventually ask is that I'm a new
PostgreSQL practitioner so the amount of things I don't know about
PostgreSQL is depressingly large.
While reading through the recent "Row level security - notes and questions"
thread I saw this SQL statement:
CREATE POLICY accounts_policy ON testrls.accounts
FOR ALL
TO users
USING (true)
WITH CHECK (username = SESSION_USER);
The bit that is the catalyst for this e-mail is: SESSION_USER.
As a recent convert to the Church of Postgres I've been consuming vast
amounts of information on PostgreSQL, and SESSION_USER is not the first nor
only, what I'm calling magic constant, that I've seen. Off the top of my
head, other examples that I've encountered are CURRENT_USER and
CURRENT_TIMESTAMP.
So my question is this, is there a reference table in the documentation
that I haven't found yet that lists all magic constants and their meaning?
And if not in the official documentation is it in the wiki?
Thanks,
Dane
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2015-07-11 19:21:29 | Re: A table of magic constants |
Previous Message | Adrian Klaver | 2015-07-11 17:42:27 | Re: timestamp check |