From: | Ivan <iv(at)psycho(dot)pl> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Few Simple Questions |
Date: | 2003-02-28 20:27:34 |
Message-ID: | Pine.LNX.4.44.0302282118070.15864-100000@rex.anfa.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 28 Feb 2003, Richard Huxton wrote:
> On Thursday 27 Feb 2003 8:05 pm, Ivan wrote:
> > HI
> >
> > how can i get user ip, who can only connect by tcp/ip , for example in
> > plpgsql function . ??
>
> This has come up before - check the archives, I'm afraid I can't remember the
> solution.
>
Yes, i saw it, but there are no solution, "because not all connection can
be throught tcp/ip" , but i asking about only tcp/ip transmisions .. ??
> > how can declare and define my own variables in each connect to db, and
> > read it / or change it in plpgsql function ?
>
> You can't AFAIK - usual method is to store session variables in the
> application or in a session-table.
>
> > is possible to create this same name of users in one postmaster but in
> > different db ?
>
> Not AFAIK - users are for a cluster of databases, a whole installation.
>
> > how to change default grant to created objects, (tables ,functions, etc) ?
>
> Sorry, not sure what you mean here.
>
When i created same object like table , function , etc, pg give my object
same default perms, like all to owner, for functions execute for all etc,
how can i change it ?
> > where can i change max length of function's name ? its can be only in one
> > place ?
>
> Don't know, but it will be in the source code and will probably affect all
> objects (you'll be redefining the "name" type I'd suspect).
>
i thing it will be somewhere same static table ( like in C progs.) and
then should be only sizeof , bat im not sure , so i asking before starting
search.
> > how can i return more then 1 row in one time in function with SETOF
> > same_type; (plpgsql) like : RETURN NEXT SELECT f FROM BIG_TABLE ;
>
> Look up table functions in the 7.3 manuals, and on
> http://techdocs.postgresql.org - there are some good examples in techdocs.
>
i've already read man :(
> > how to disallow user to create anything, user for example can select from
> > same function. this user also can not see others databases and objects in
> > actual db .. etc ( it should be default ?? ) ?
>
> Not sure you can stop them seeing other objects. If a user can't read the
> system tables, they can't see anything.
>
because my simply one user can onle select from same tables , he cant
updating , deleteing, etc, but he can do for example create table, :(
> > how set default value of function's args.
>
> Well, this depends on the language you write the function in. It won't help
> much though, because PG's type matching doesn't allow you to leave out
> function arguments. if it's defined as f(int,int) then it needs two integers
> passed to it.
>
:(
> HTH
> --
> Richard Huxton
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2003-02-28 20:30:26 | Re: Locking rows |
Previous Message | scott.marlowe | 2003-02-28 20:22:58 | Re: phpBB2 slow on postgres vs mysql ? |