470,581 Members | 2,438 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,581 developers. It's quick & easy.

escaping - sign

I'm trying to accomplish the following:
GRANT all ON friends TO www-data;

however the - sign in www-data seems to be a problem, how should I
escape it correctly?

regards,
hugo
Aug 13 '05 #1
2 1858
In article <42***********************@news.skynet.be>,
Hugo Coolens <hu*********@skynet.be> wrote:
I'm trying to accomplish the following:
GRANT all ON friends TO www-data;

however the - sign in www-data seems to be a problem, how should I
escape it correctly?

regards,
hugo

Oofa - you should not use - in your table or field names.

You can try

GRANT ALL ON friends TO "www-data";

and see what that gets ya...

Let us know how it goes...

--
Available for Hire! http://amduus.com/Resumes/
Aug 14 '05 #2
Scott Auge wrote:
In article <42***********************@news.skynet.be>,
Hugo Coolens <hu*********@skynet.be> wrote:

I'm trying to accomplish the following:
GRANT all ON friends TO www-data;

however the - sign in www-data seems to be a problem, how should I
escape it correctly?

regards,
hugo
Oofa - you should not use - in your table or field names.

in fact it is not a table or field name but a user name You can try

GRANT ALL ON friends TO "www-data";

and see what that gets ya...

this also does not work:
friends=> GRANT ALL ON friends to www-data;
ERROR: syntax error at or near "-" at character 28
friends=> GRANT ALL ON friends to "www-data";
ERROR: user "www-data" does not exist

In the past that user was wwwrun but on Debian Sarge it seems they
created a default user www-data ...I'd like to keep that user.

any help welcome
hugo
p.s. I'm trying out the tutorial at:
http://pgsql.designmagick.com/tutorial.php?id=4
Aug 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Dave Moore | last post: by
2 posts views Thread by Ding | last post: by
reply views Thread by Simon Hawkins | last post: by
5 posts views Thread by bobbyballgame | last post: by
11 posts views Thread by Geoff Caplan | last post: by
3 posts views Thread by Taras_96 | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.