From: | Dmitri Touretsky <dmitri(at)listsoft(dot)ru> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Couple simple(?) questions... |
Date: | 2000-11-26 01:56:21 |
Message-ID: | 3511589880.20001126045621@listsoft.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)listsoft(dot)ru )
From | Date | Subject | |
---|---|---|---|
Next Message | GH | 2000-11-26 02:02:20 | Re: Couple simple(?) questions... |
Previous Message | Ron Chmara | 2000-11-26 00:26:42 | Re: [NOVICE] Re: re : PHP and persistent connections |