Re: Separate Sessions?? (View data <-> Query tool)

From: Csaba Együd <csegyud(at)gmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Re: Separate Sessions?? (View data <-> Query tool)
Date: 2008-11-27 14:06:00
Message-ID: ggm9g6$1csb$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-general

""Willy-Bas Loos"" <willybas(at)gmail(dot)com> a következoket írta üzenetében
news:1dd6057e0811270036s67a6b8baqda17273b0484e53d(at)mail(dot)gmail(dot)com(dot)(dot)(dot)
>The problem is that my triggers refuse modifying a record if a given Temp
>table is not created before, because one or more fields have their default
>values from that temp table

So why don't you either use a normal table, or if you need simultaneous use
of the trigger with different values, use an array instead of a table. Or
you might create the temp table in the trigger function..
If you create a normal table you can still delete it afterwards.

hth
WBL
--
"Patriotism is the conviction that your country is superior to all others
because you were born in it." -- George Bernard Shaw

Willy,
you are right but... this is a bit difficult but I try to explain. I develop
an office management software which uses Postgres as a RDB server. This
software has to handle many firms separately but by design it has to use
only one database (customer requirement) so I had to find out a solid way to
separate the firms form each other. I find out that I qualify every
firm-dependent record with a firmid.

After logging in the client software will create a TEMP table in which it
stores the selected firmid. This TEMP table will live durring the login
session. After this point every views will filter to this firmid and won't
give back other firms' data just this. I know that other client softwares
will be able to select data from the tables. (Unfortunatelly I don't know a
way to revoke select right from a table while a view can select from it...
Do you know such thing?) Because of this I know that the clean way would be
using separate databases for separate firms but this was not my decision.
:( If you know a setting which can improve the security pleas let me know.

Also I had to assure that the INSERT and UPDATE operations will only work
for the selected firm and the user won't be able to potter with other firms'
data even not accidentally. This is done in triggers and this causes my
"View data tool" problem because viewing is possible but modifying is
enabled only when a firmid is set in the TEMP table.

BTW, I can use script templates with Query tool (like INSERT or UPDATE
script) which are very handy.

Thx,

--
Best Regards,
Csaba Együd
IN-FO Studio

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Willy-Bas Loos 2008-11-28 08:30:19 Re: Separate Sessions?? (View data <-> Query tool)
Previous Message Willy-Bas Loos 2008-11-27 08:36:36 Re: Separate Sessions?? (View data <-> Query tool)

Browse pgsql-general by date

  From Date Subject
Next Message Scara Maccai 2008-11-27 16:45:51 Nested Loop Left Join always shows rows=1
Previous Message Vishal Arora 2008-11-27 12:27:26 Re: PgAgent Job Scehduler is NOT running