Couple simple(?) questions...
От | Dmitri Touretsky |
---|---|
Тема | Couple simple(?) questions... |
Дата | |
Msg-id | 3511589880.20001126045621@listsoft.ru обсуждение исходный текст |
Ответы |
Re: Couple simple(?) questions...
Re: Couple simple(?) questions... |
Список | pgsql-novice |
Good time of the day! I'm a real novice to PostgreSQL, so please be patient with me :)) I've run into few questions I can't find answers to... Will appreciate any responce. 1. Is it possible to SELECT from two databases? Something like SELECT db1.table1.field, db2.table1.fields ... 2. There is a table of the following structure: CREATE TABLE test ( id int4, string1 text, string2 text, ord int2); I need to get a list of different "string1" strings ordered by "ord". But SELECT DISTINCT id, string1 ... ORDER BY ord" doesn't work. Is there any way to get it? 3. I have two tables, say table1 and table2. Need to let web users insert data into one of the tables. So far it's easy. Hard point: web-user should be able insert rows into table1 and at the same time update related rows in table2. And I need to maximally secure table2. I've tried to create a view based on table1 and a set of rules, but rules are applied with web username. So if I grant web users right to update table2 than I can't protect this table; and if I don't grant them those rights than I don't see a way to update rows in table2. Question: is there a way to run rule on behalf of different user? Something like setusername(user)? PS. Will appreciate any points to docs on security of web access to PostgreSQL. Best regards, Dmitri ( mailto:dmitri@listsoft.ru ) http://www.listsoft.com/
В списке pgsql-novice по дате отправления: