[Mailman-Developers] OT: Re: user table in Mailman3 with PostgreSQL

2014-07-16 Thread Daniel Kahn Gillmor
On 07/16/2014 10:34 AM, ML mail wrote:
 Thanks for the trick with the double quotes to escape reserved keywords.

It's probably worth reading the PostgreSQL documentation for this sort
of thing:

http://www.postgresql.org/docs/9.3/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS


 Actually I wanted to display the content of the user table to find out in 
 which table are the subscribers of any mailing list recorded. Do you have any 
 idea? 

You already know how to find the content of the table:

  select * from tablename

If you're asking about inspecting the table structure from the psql
command line, you probably want \d tablename or one of its variants.
If you're not familiar with the psql command line, you probably want to
know about the two main help commands: \? and \h.

For further questions about postgresql, you should ask on a
psql-specific mailing list.  The current list is for discussing mailman,
so we are increasingly off-topic.

You can find a good set of postgresql mailing lists here:

 http://www.postgresql.org/list/

Regards,

--dkg



signature.asc
Description: OpenPGP digital signature
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

[Mailman-Developers] listarchiver table missing from postgresql schema

2014-07-16 Thread ML mail
Hi,

I am currently testing Mailman3 with PostgreSQL and found out that the 
listarchiver table is missing from the PostgreSQL schema 
(database/schema/postgres.sql). It is correctly included in SQLite migration 
schema though (database/schema/sqlite_2013040600_01.sql).

Regards
ML
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] OT: Re: user table in Mailman3 with PostgreSQL

2014-07-16 Thread Barry Warsaw
On Jul 16, 2014, at 08:20 AM, 'ML mail' via barry wrote:

Thanks for the details but actually I was now only asking in which table are
stored the e-mail addresses of a mailing's list subscribers? I thought they
would be stored in the user table but I can't see any e-mail addresses
there, neither in the member table.

Correct.  It's useful to understand the model.

http://pythonhosted.org//mailman/src/mailman/docs/8-miles-high.html#user-model

Users have an id and a display name.  Addresses are separate objects linked to
at most one user.  A user can be linked to many addresses.  Members associate
an address/user with a mailing list[*] under a specific role.  Rosters are
magical objects which perform queries to answer questions like all the
regular delivery members of a mailing list or all of the list's moderators.

So the information you're looking for isn't captured in a single table.
You'll have to do a query to get the email addresses of a mailing list's
subscribers.  Take a look at the roster implementations for details.

Cheers,
-Barry

[*] A member links a user only if that user has a preferred address.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] OT: Re: user table in Mailman3 with PostgreSQL

2014-07-16 Thread ML mail
Thanks, it all makes sense now!




On Wednesday, July 16, 2014 7:20 PM, Barry Warsaw ba...@list.org wrote:
On Jul 16, 2014, at 08:20 AM, 'ML mail' via barry wrote:




Thanks for the details but actually I was now only asking in which table are
stored the e-mail addresses of a mailing's list subscribers? I thought they
would be stored in the user table but I can't see any e-mail addresses
there, neither in the member table.

Correct.  It's useful to understand the model.

http://pythonhosted.org//mailman/src/mailman/docs/8-miles-high.html#user-model

Users have an id and a display name.  Addresses are separate objects linked to
at most one user.  A user can be linked to many addresses.  Members associate
an address/user with a mailing list[*] under a specific role.  Rosters are
magical objects which perform queries to answer questions like all the
regular delivery members of a mailing list or all of the list's moderators.

So the information you're looking for isn't captured in a single table.
You'll have to do a query to get the email addresses of a mailing list's
subscribers.  Take a look at the roster implementations for details.

Cheers,
-Barry

[*] A member links a user only if that user has a preferred address.

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] OT: Re: user table in Mailman3 with PostgreSQL

2014-07-16 Thread ML mail
Thanks, it all makes sense now!




On Wednesday, July 16, 2014 7:20 PM, Barry Warsaw ba...@list.org wrote:
On Jul 16, 2014, at 08:20 AM, 'ML mail' via barry wrote:




Thanks for the details but actually I was now only asking in which table are
stored the e-mail addresses of a mailing's list subscribers? I thought they
would be stored in the user table but I can't see any e-mail addresses
there, neither in the member table.

Correct.  It's useful to understand the model.

http://pythonhosted.org//mailman/src/mailman/docs/8-miles-high.html#user-model

Users have an id and a display name.  Addresses are separate objects linked to
at most one user.  A user can be linked to many addresses.  Members associate
an address/user with a mailing list[*] under a specific role.  Rosters are
magical objects which perform queries to answer questions like all the
regular delivery members of a mailing list or all of the list's moderators.

So the information you're looking for isn't captured in a single table.
You'll have to do a query to get the email addresses of a mailing list's
subscribers.  Take a look at the roster implementations for details.

Cheers,
-Barry

[*] A member links a user only if that user has a preferred address.

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9