On 07/15/2014 06:16 AM, ML mail wrote:
> Hello,
> 
> I am not sure it is a good idea to name the user table "user". As you can see 
> in PostgreSQL "user" is a reserved word:
> 
> \c mailman
> 
> select * from user;
>  current_user
> --------------
>  postgres
> 
> (1 row)
> 
> Any ideas how I can still list the content of the mailman3 user table in 
> PostgreSQL?

You should wrap the name of the table in double quotation marks:

dkg=> create table "user" ( foo int );
CREATE TABLE
dkg=> insert into "user" (foo) VALUES (1);
INSERT 0 1
dkg=> select * from "user";
 foo
-----
   1
(1 row)

dkg=>

This is generally good practice for all table names, if you want to
treat them consistently in your code.

hth,

        --dkg

Attachment: 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

Reply via email to