By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,789 Members | 1,433 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,789 IT Pros & Developers. It's quick & easy.

escaping - sign

P: n/a
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
Share this Question
Share on Google+
2 Replies

P: n/a
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

P: n/a
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.