Re: Table ownership question.
Posted in 1994
>From: kafts@fullfeed.fullfeed.com (Steve Kaftanski)
>Subject: Table ownership question.
>Date: Wed, 30 Mar 1994 15:43:47 GMT
>X-Informix-List-Id: <news.6103>
>
>Is there a way with ESQL/C 4.0 do create a table with ownership different than
>the current login name and then grant privileges on that table to the current
>login name?
>
>I'm trying to create a table with the same name, but different owners and
>would like to be able to do it during the execution of one program instead of
>having to run the program once for each owner.
>
>Thanx much,
>kafts@fullfeed.com
If anything is going to work, it will be notation like:
create table 'user1'.tablename(col01 integer not null, ...);
grant all on 'user1'.tablename to 'user2' as 'user1';create table 'user2'.tablename(col01 integer not null, ...);
grant all on 'user2'.tablename to 'user1' as 'user2';
I don't have the 4.00 manuals available to check how much of this syntax
was supported. This works in a mode ANSI database under the 5.02.UC1
OnLine engine -- it won't work in a database which is not mode ANSI, of
course. The quotes must be used consistently -- in the absence of quotes,
the user names are converted to upper-case for ANSI compliance.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>