Re:

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Ivan <ivan(at)psycho(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re:
Date: 2003-02-19 09:07:14
Message-ID: Pine.LNX.4.21.0302190857210.2991-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 19 Feb 2003, owner wrote:

>
> hi, i have some question and propos.
> 1. how can i get count of result's rows where i declare cursor ??
> i need it to declare momeory , but i dont know how ...

Perhaps you don't need to use a cursor if you are allocating storage for all
the result set rather than processing small batches of rows.

>
> 2. I sometime select look like for example select 123 as "Foo 3" , 456 as
> "Foo 4 ... ", and writing where is fanny.. in select should be somthing
> like [] what == name of col. select would look : "select 232 as "QWE RTYU"
> where [1] LIKE 'QWE%'; like in C or C++ or in any other lang.

I don't understand what you are asking here. I am not sure others will either.
Could you post an example in C so we can see what it is you mean?

> 3. Good thing will be to have somthing like suid in functions. When I do
> select some_func ('arg1', 2 ,3 ) ; function should read table, and all
> object like owner of this function. Most select do my functions, from many
> tabels, and somtimes i have to give some person access to db and tables,
> bo i want not give them all tables but only special rows, and it will be
> good for just function with suid .. can you understand me ? :)
> Also can be function to get user id, or name, and ip etc ...

You can use views to achieve some of this. I think the following would work.

CREATE TABLE mytable ( a integer );
CREATE VIEW myview AS SELECT * FROM mytable WHERE a = 24;
GRANT SELECT ON myview TO otheruser;

>
> 4. Is possible to bring pg_hba.conf to db , in to pg_* tables ??

There is no pg_ table for this. You could process the file and store the data
in a table but it would only be useful for reporting the contents of the table
and not necessarily reflect the file contents.

--
Nigel J. Andrews

In response to

  • at 2003-02-19 08:05:10 from owner

Browse pgsql-general by date

  From Date Subject
Next Message Mark Cave-Ayland 2003-02-19 11:03:12 Re: 7.3.1 takes long time to vacuum table?
Previous Message Teodor Sigaev 2003-02-19 09:03:31 Re: problems with tsearch