Re: Retrieving the role in a logical replication plugin

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: pgsql-general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Retrieving the role in a logical replication plugin
Date: 2015-01-23 12:18:14
Message-ID: CAB7nPqQ9skU12h1VjsE_TYXVvi6G3HPswKd-ZH3G+r_NyT=_xQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 23, 2015 at 4:20 PM, Christophe Pettus <xof(at)thebuild(dot)com> wrote:
> I'm working on a 9.4 logical replication plugin, mostly for my own edification, and have run into a limit of my knowledge: How can I retrieve the role (either oid or textual name) associated with the operations my callbacks are receiving? Apologies if it is staring me in the face and I've missed it...
I think that you are looking for GetUserNameFromId(GetUserId()) from
miscadmin.h.
Regards,
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2015-01-23 12:43:43 Re: How to create a specific table
Previous Message Raymond O'Donnell 2015-01-23 11:25:41 Re: how to duplicate data for few times by SQL command in PG