Re: Table with Field Serial - Problem

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Yostin Vargas <yostinv(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Table with Field Serial - Problem
Date: 2013-10-31 16:13:21
Message-ID: 527281A1.8090907@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/31/2013 08:23 AM, Yostin Vargas wrote:
> Yes i have a single field because is related to another table that
> contains, the name
>
> it's for to do multilanguage
>
> Example
>
> Table1
> Column | Type | Modifiers
> ----------+-------------------__+-----------------------------__------------------------------__--
> id | integer | not null default
> nextval('test_table_id_fld___seq'::regclass)
>
>
> Table2
> Column | Type | related
> ----------+-------------------__+-----------------------------__------------------------------__--
> id_table1 | integer | FK of Table1.id
> id_lang | integer | FK of lang.id <http://lang.id>
> name | varchar
>

I may be having one of my dumb moments, but what does the above
accomplish that including the serial column in Table2 does not?

>
> I solve it doin it " $model->id=new CDbExpression('DEFAULT'); "

Great.

>
> Thanks for your Helps

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2013-10-31 16:15:28 Re: Connection pooling
Previous Message Merlin Moncure 2013-10-31 15:32:45 Re: GSSAPI server side on Linux, SSPI client side on Windows