Re: [GENERAL] How to express categorized items in relational tables

Поиск
Список
Период
Сортировка
От Chris Bitmead
Тема Re: [GENERAL] How to express categorized items in relational tables
Дата
Msg-id 373BAFE8.2D40B94C@bigfoot.com
обсуждение исходный текст
Ответ на Re: [GENERAL] How to express categorized items in relational tables  (Doo Suk Yang <microbe@mail.lgchem.co.kr>)
Ответы Re: [GENERAL] How to express categorized items in relational tables  (Doo Suk Yang <microbe@mail.lgchem.co.kr>)
Список pgsql-general
I think you want something like...
INSERT INTO child(foo,bar,baz,category) SELECT 'foo1', 'bar1', 'baz1,
oid FROM category WHERE category.name = 'CategoryFoo';

I'm not sure. Is that what you mean?

Doo Suk Yang wrote:

> Thank you for your answer. It is going to be working.
>
> BTW, when inserting a parents category I had to go through two steps;
> selecting category of parents and inserting new title and selected
> category. Of course I'm using Perl and the above two steps are not  great
> matter. But still I'm curious is it possible to write an SQL statement to
> do it.
>
> ===============================================================================
> Science is the game we play with God to find out what his rules are.
> -------------------------------------------------------------------------------
> Doo Suk Yang
> Research Scientist                              Voice: 82-42-866-2222
> LG Chemical Ltd. Research Park
> Biotech Research Institute I                    FAX:   82-42-861-2566
> -------------------------------------------------------------------------------
> A fool hath no delight in understanding, but that his heart may discover itself.
> (Proverbs 18:2)
> ===============================================================================

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

Предыдущее
От: Doo Suk Yang
Дата:
Сообщение: Re: [GENERAL] How to express categorized items in relational tables
Следующее
От: "Stéphane Popinet"
Дата:
Сообщение: overwriting large objects bug?