Re: Table like a field

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Table like a field
Дата
Msg-id 422F0601.70103@archonet.com
обсуждение исходный текст
Ответ на Table like a field  (lucas@presserv.org)
Список pgsql-sql
lucas@presserv.org wrote:
> Hello.
> Is there any way to build a table that contain the coluns name for the other
> table fields? like this:
> 
>  create table people(id serial primary key, name varchar(50) );
>  create table people_fields ( field_name varchar(30) );
>  insert into people_fields values ('occupation');
>  insert into people_fields values ('address');
> 
>  then I create any function or view to get:
>  SELECT * FROM people; //may return
> 
>  id - name - | ocuppation - address |

You'll want to search the mailing-list archives for "crosstab", and also 
look in the contrib/ section of the source distribution.

--   Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: Gary Stainburn
Дата:
Сообщение: Re: order by question
Следующее
От: Greg Stark
Дата:
Сообщение: Re: order by question