Skip site navigation (1) Skip section navigation (2)

Couple simple(?) questions...

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: (view raw, whole thread or download thread mbox)
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

Best regards,
 Dmitri ( mailto:dmitri(at)listsoft(dot)ru )


pgsql-novice by date

Next:From: GHDate: 2000-11-26 02:02:20
Subject: Re: Couple simple(?) questions...
Previous:From: Ron ChmaraDate: 2000-11-26 00:26:42
Subject: Re: [NOVICE] Re: re : PHP and persistent connections

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group