473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Wanted: Trick for granting permissions to users with hyphens

Hello

I like to grant some permissions to the user www-data (default user
for apache under debian)

GRANT SELECT, UPDATE, INSERT, DELETE ON customer TO herbie, www-data;

The statements throws the following error:
ERROR: parser: parse error at or near "-" at character 64

Seems to me that hyphens are not allowed for user names. But a »createuser
www-data« is working correct an I can access the database with that
user.

I tried to quote the www-data with 'www-data', www\-data with
the same result.

Any hints? I'm using 7.3.2

Thanks and best regards
Herbie
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
Herbert Liechti http://www.thinx.ch
The content management company. Visit http://www.contentx.ch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #1
2 5919
Herbert Liechti wrote:
Hello

I like to grant some permissions to the user www-data (default user
for apache under debian)

GRANT SELECT, UPDATE, INSERT, DELETE ON customer TO herbie, www-data;

The statements throws the following error:
ERROR: parser: parse error at or near "-" at character 64

Seems to me that hyphens are not allowed for user names. But a ?createuser
www-data? is working correct an I can access the database with that
user.

I tried to quote the www-data with 'www-data', www\-data with
the same result.

Any hints? I'm using 7.3.2


Double-quotes:

test=> GRANT SELECT, UPDATE, INSERT, DELETE ON test TO "www-data";

--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #2
On Wed, Nov 19, 2003 at 16:48:49 +0100,
Herbert Liechti <he****@thinx.ch> wrote:
Hello

I like to grant some permissions to the user www-data (default user
for apache under debian)

GRANT SELECT, UPDATE, INSERT, DELETE ON customer TO herbie, www-data;

The statements throws the following error:
ERROR: parser: parse error at or near "-" at character 64

Seems to me that hyphens are not allowed for user names. But a »createuser
www-data« is working correct an I can access the database with that
user.

I tried to quote the www-data with 'www-data', www\-data with
the same result.

Any hints? I'm using 7.3.2


Single quotes are for data; use double quotes for including special characters
in names.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Shelly | last post by:
I have a new server and I have my files up there. The files are in /var/www/html/. In this directory I have another directory that I created called "users". I am unable to figure out how to set...
0
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
2
by: Ted | last post by:
How do I grant all privileges for a schema that has a large number of existing tables, procedures, functions, etc to a newly created role, without having to issue a grant statement for each object...
3
by: wireless | last post by:
What is the best way to grant a user permission to create a view? I first created a role using enterprise manager but for the role I created it doesn't seem to offer that permission. It offers...
0
by: Herbert Liechti | last post by:
Hello I like to grant some permissions to the user www-data (default user for apache under debian) GRANT SELECT, UPDATE, INSERT, DELETE ON customer TO herbie, www-data; The statements...
2
by: LazyAnt | last post by:
Hello, I have DB2 v8.1 for Linux for a class environment; each user has his/her own database as dbadm and they are suppose to study queries from another database. They have the right...
13
by: Siegfried Heintze | last post by:
I refered the engineer at my hosting service to http://support.microsoft.com/default.aspx?scid=kb;en-us;825738 where he tried to follow the directions there. He said there was no such file:...
1
by: derekolive | last post by:
I need to restrict insert permissions on a single table to a pre defined time window each day. One way would be to craete a new user in NT and restrict login to the time window, and then only...
3
by: MichaelHooker | last post by:
Newbie warning: please be gentle with me... I've never had to worry about permissions before, all my dbs have been single-user. I want to set up a PHP/MySQL based website to display photos...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.