RS] Distinguish view and table problem
W dniu 19 grudnia 2009 16:19 użytkownik Jaime Casanova
napisał:
i think he is hacking postgres's source code to make the TODO: "allow
recompilation of views" (he send an email about that in another
thread)...
oh. I didn't realise,
W dniu 19 grudnia 2009 16:19 użytkownik Jaime Casanova <
jcasa...@systemguards.com.ec> napisał:
>
> i think he is hacking postgres's source code to make the TODO: "allow
> recompilation of views" (he send an email about that in another
> thread)...
>
oh. I didn't realise, that such seemingly simp
2009/12/19 Filip Rembiałkowski :
>
> W dniu 19 grudnia 2009 03:20 użytkownik suzhiyang
> napisał:
>>
>> Sorry, I've not describe my problem precisely.
>> I mean that I want to get relkind or something from a systable by the
>> programm but not by sql.
>
> I don't understand how you can get data f
W dniu 19 grudnia 2009 03:20 użytkownik suzhiyang napisał:
> Sorry, I've not describe my problem precisely.
> I mean that I want to get relkind or something from a systable by the
> programm but not by sql.
>
I don't understand how you can get data from table without using SQL. (maybe
I'm just "
"suzhiyang" writes:
> I just want to distinguish a view and a table while postgres execute
> exec_simple_query(). In the systable of pg_class, a view and a table
> has different relkind ('r' 'v'). But when I print the parsetree and
> the rewrite parsetree, I found that a view and a table has no
>
On Fri, Dec 18, 2009 at 10:57 AM, suzhiyang wrote:
> Another question is that does postgres save the user's original query_string
> at anywhere(systable etc.)? If I want to save the sourceText in the
> systable, I could add a column to pg_class called query_string. How could I
> insert a line to p
2009/12/18 suzhiyang
> How could I get the relkind of a table(view) by its name from pg_class?
>
pg_class is (quite logically) UNIQUE on (relname, relnamespace)
SELECT c.relkind from pg_class c, pg_namespace n
where c.relnamespace = n.oid
and c.relname = 'thetable'
and n.nspname = 'theschema'
Hi!
I just want to distinguish a view and a table while postgres execute
exec_simple_query(). In the systable of pg_class, a view and a table has
different relkind ('r' 'v'). But when I print the parsetree and the rewrite
parsetree, I found that a view and a table has no character to distinguish