Re: [SQL] SQL-Query 2 get primary key

Поиск
Список
Период
Сортировка
Искать

Re: [SQL] SQL-Query 2 get primary key

От:
Michael Olivier <molivier@yahoo.com>
Дата:
This doesn't work for me in 6.3.2-10 on RH Linux. Is this a newer
feature?


---jose' soares  wrote:
>
> You may query pg_indexes as in:
> 
> select * from pg_indexes where tablename = 'test';
> 
> tablename|indexname|indexdef
>
---------+---------+-----------------------------------------------------------------------
> 
> test     |test_pkey|CREATE UNIQUE INDEX "test_pkey" ON "test" USING
btree
> ("id" "int4_ops")
> (1 row)

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

Re: [SQL] SQL-Query 2 get primary key

От:
"jose' soares" <sferac@bo.nettuno.it>
Дата:


Michael Olivier ha scritto:

> This doesn't work for me in 6.3.2-10 on RH Linux. Is this a newer
> feature?
>
> ---jose' soares  wrote:
> >
> > You may query pg_indexes as in:
> >
> > select * from pg_indexes where tablename = 'test';
> >
> > tablename|indexname|indexdef
> >
> ---------+---------+-----------------------------------------------------------------------
> >
> > test     |test_pkey|CREATE UNIQUE INDEX "test_pkey" ON "test" USING
> btree
> > ("id" "int4_ops")
> > (1 row)
>

This is my version:

hygea=> select version();
version
-------------------------------------------------------------
PostgreSQL 6.4.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.
(1 row)

--
                               - Jose' -


FAQ