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