[Info-ingres] dbms sequences access



Hi Everyone,

I'm trying to create a dbms sequence, and restrict the nextval/currval
access to it. Yet whenever I create the sequence it appears that
everyone has access automatically.

What have I done wrong here?

/* create a public database */
createdb bowtest -f nofeclients

/* create the sequence, and do not grant anything to anyone */
sql bowtest << SQL_END
create sequence next_id\g
SQL_END

Then log in as another user and...
sql bowtest <<SQL_END
select next_id.nextval as fred\g
\q
SQL_END

I would expect that it would bitch that there is no such sequence, or that
you don't have the necessary privilege. However, I find that there
appears to be no problem accessing the database owners sequence.

The IIR3 manual indicates that before the sequence should be
available to anyone they need the 'next' privilege granted. ie I need to
log in as database owner and issue the command:
grant next on sequence next_id to public\g

Martin Bowes
--
Random Duckman Quote #113:
Cornfed: You parked in a handicapped space.
Duckman: So what, no one ever notices except people who are
supposed to park there and Hell, I can outrun them anyday.

.