Hi!
It seems to me that triggers on a table are run in the session context
of the user who made a change in the table, but not of the user who
defined the trigger?
So I create a temporary function:
CREATE OR REPLACE FUNCTION pg_temp.my_function()
And a temporary table:
CREATE TEMPORARY TABLE p
On 12/28/18 12:47 PM, Mitar wrote:
Hi!
It seems to me that triggers on a table are run in the session context
of the user who made a change in the table, but not of the user who
defined the trigger?
So I create a temporary function:
CREATE OR REPLACE FUNCTION pg_temp.my_function()
And it doe
Hi!
On Fri, Dec 28, 2018 at 12:57 PM Adrian Klaver
wrote:
> > CREATE OR REPLACE FUNCTION pg_temp.my_function()
>
> And it does what?
Copies/transforms data from posts into posts_temp.
> > When a row is added to "posts" table outside of my session, function
> > "my_function" is called, but it se
Hi, ALL,
Following code:
int PostgresDatabase::GetTableOwner (const std::wstring &schemaName,
const std::wstring &tableName, std::wstring &owner,
std::vector &errorMsg)
{
int result = 0;
std::wstring query = L"SELECT u.usename FROM pg_class c, pg_user
u, pg_namespace n WHERE n.oid = c.relna
On Fri, Dec 28, 2018 at 2:00 PM Igor Korot wrote:
> Hi, ALL,
> Following code:
>
> int PostgresDatabase::GetTableOwner (const std::wstring &schemaName,
> const std::wstring &tableName, std::wstring &owner,
> std::vector &errorMsg)
> {
>int result = 0;
> std::wstring query = L"SELECT u.use
Hi,
On Fri, Dec 28, 2018 at 4:51 PM patrick keshishian wrote:
>
>
> On Fri, Dec 28, 2018 at 2:00 PM Igor Korot wrote:
>>
>> Hi, ALL,
>> Following code:
>>
>> int PostgresDatabase::GetTableOwner (const std::wstring &schemaName,
>> const std::wstring &tableName, std::wstring &owner,
>> std::vector
Hi,
On Fri, Dec 28, 2018 at 5:07 PM Igor Korot wrote:
>
> Hi,
>
> On Fri, Dec 28, 2018 at 4:51 PM patrick keshishian wrote:
> >
> >
> > On Fri, Dec 28, 2018 at 2:00 PM Igor Korot wrote:
> >>
> >> Hi, ALL,
> >> Following code:
> >>
> >> int PostgresDatabase::GetTableOwner (const std::wstring &sc
On 12/28/18 12:59 PM, Mitar wrote:
Hi!
On Fri, Dec 28, 2018 at 12:57 PM Adrian Klaver
wrote:
CREATE OR REPLACE FUNCTION pg_temp.my_function()
And it does what?
Copies/transforms data from posts into posts_temp.
When a row is added to "posts" table outside of my session, function
"my_func
On Fri, Dec 28, 2018 at 3:07 PM Igor Korot wrote:
> Hi,
>
> On Fri, Dec 28, 2018 at 4:51 PM patrick keshishian
> wrote:
> >
> >
> > On Fri, Dec 28, 2018 at 2:00 PM Igor Korot wrote:
> >>
> >> Hi, ALL,
> >> Following code:
> >>
> >> int PostgresDatabase::GetTableOwner (const std::wstring &schema
Hi,
Starting yesterday morning, auto vacuuming of one of our postgresql 9.6.10
(CentOS 7) table's started failing:
ERROR: found multixact 370350365 from before relminmxid 765860874
CONTEXT: automatic vacuum of table "userdb.public.subs"
This is about as plain and simple a table as there is. No
Mark Fletcher writes:
> Starting yesterday morning, auto vacuuming of one of our postgresql 9.6.10
> (CentOS 7) table's started failing:
> ERROR: found multixact 370350365 from before relminmxid 765860874
> CONTEXT: automatic vacuum of table "userdb.public.subs"
Ugh.
> Reading the various disc
On Fri, Dec 28, 2018 at 4:49 PM Tom Lane wrote:
>
> Yeah, SELECT FOR UPDATE should overwrite the broken xmax value and thereby
> fix it, I expect. However, I don't see anything in the release notes
> suggesting that we've fixed any related bugs since 9.6.10, so if this
> just appeared then we've
Hi, Patrick,
Here is my new code:
int PostgresDatabase::GetTableOwner (const std::wstring &schemaName,
const std::wstring &tableName, std::wstring &owner,
std::vector &errorMsg)
{
int result = 0;
std::wstring query = L"SELECT u.usename FROM pg_class c, pg_user
u, pg_namespace n WHERE n.oi
Hi!
On Fri, Dec 28, 2018 at 3:25 PM Adrian Klaver wrote:
> > Sure, but why is a temporary function used as a temporary trigger made
>
> There is no such thing as a temporary trigger.
A trigger defined using a temporary function gets deleted once a
function gets deleted, which is at the end of th
On 12/28/18 7:56 PM, Mitar wrote:
Hi!
On Fri, Dec 28, 2018 at 3:25 PM Adrian Klaver wrote:
Sure, but why is a temporary function used as a temporary trigger made
There is no such thing as a temporary trigger.
A trigger defined using a temporary function gets deleted once a
function gets de
On Fri, Dec 28, 2018 at 5:40 PM Igor Korot wrote:
> Hi, Patrick,
>
> Here is my new code:
>
> int PostgresDatabase::GetTableOwner (const std::wstring &schemaName,
> const std::wstring &tableName, std::wstring &owner,
> std::vector &errorMsg)
> {
> int result = 0;
> std::wstring query = L"
Hi!
On Fri, Dec 28, 2018 at 9:36 PM Adrian Klaver wrote:
> When you create the temporary function it is 'pinned' to a particular
> session/pg_temp_nn. Running the trigger in another session 'pins' it to
> that session and it is not able to see the posts_temp table in the
> original session.
Yes.
17 matches
Mail list logo