473,385 Members | 1,821 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,385 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 5910
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.