Role attribute for user email?

Started by Philippe Langabout 18 years ago2 messagesgeneral
Jump to latest
#1Philippe Lang
philippe.lang@attiksystem.ch

Hi,

Is there a way to create new attributes for a login role, like an "email
attribute"?

I have to keep a few informations on all the users that connect to the
PG server, and their attributes list looks like an elegant place to
store these informations. But I cannot find a way to add new
attributes... Is that possible?

Thanks,

Philippe Lang

#2Korry Douglas
korry.douglas@enterprisedb.com
In reply to: Philippe Lang (#1)
Re: Role attribute for user email?

Is there a way to create new attributes for a login role, like an "email
attribute"?

I have to keep a few informations on all the users that connect to the
PG server, and their attributes list looks like an elegant place to
store these informations. But I cannot find a way to add new
attributes... Is that possible?

You might consider using inheritance:

CREATE TABLE users(email TEXT) INHERITS(pg_authid);

But I'm not sure that will work on the pg_authid table. And it seems
like you would have to insert/update manually instead of using the
CREATE/ALTER ROLE commands.

-- Korry

--

Korry Douglas <korryd@enterprisedb.com>
EnterpriseDB http://www.enterprisedb.com