Re: [HACKERS] Getting table name/tuple from OID

2005-11-07 Thread Paresh Bafna
Actually I want to do this from inside the postgres code i.e. I want to
get table name and tuple values from OID of corresponding table OID and
tuple OID.
Is there any built in function in postgres code to do this?

Paresh

Christopher Kings-Lynne wrote:

> Try
>
> SELECT 12341234::regclass;
>
> Where 12341234 is the OID of a table.
>
> Otherwise try:
>
> SELECT tableoid, * FROM table;
>
> To get the tableoid on each row.
>
> Chris
>
> Paresh Bafna wrote:
>
>> Is there any way to retrieve table name and/or tuple values from OID of
>> table/tuple?
>>
>> ---(end of broadcast)---
>> TIP 5: don't forget to increase your free space map settings
>
>
> ---(end of broadcast)---
> TIP 5: don't forget to increase your free space map settings



---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[HACKERS] Getting table name/tuple from OID

2005-11-07 Thread Paresh Bafna
Is there any way to retrieve table name and/or tuple values from OID of
table/tuple?

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[HACKERS] Creating table in different database

2005-10-24 Thread Paresh Bafna
If there are multiple databases, say db1 and db2.
And currently we are in db1, can we create table in db2 (without
switching databases)?
Is there any query to do this?

- Paresh

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


[HACKERS] Nested/recursive query execution

2005-10-22 Thread Paresh Bafna
Hi all,
I am new to postgres developement. Want some help.
Can we run nested query in postgres?
Means, can I do like -

When somequery is being executed (say "create database") it goes through
exec_simple_query():backend/tcop/postgres.c (if I am not wrong) then can
I call exec_simple_query() from createdb():backend/commands/dbcommands.c

Actually I tried to do that but I think portal used for "create
database" is still ACTIVE when I call exec_simple_again, and thats why
it give error like "can not drop portal - still active"

Is it due to exec_simple_query() creates unnamed portal?



---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[HACKERS] Implementing Multi-relation/column keyword indices

2005-10-11 Thread Paresh Bafna
For implementing "Multi-relation/column keyword indices", which modules
of postgres might be required to change or look into?
BTW anyone has clear idea about "Multi-relation/column keyword indices"?

Cheers,


---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org