Re: select issue with order v8.1

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Terry <td3201(at)gmail(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: select issue with order v8.1
Date: 2010-03-05 15:19:43
Message-ID: 201003050719.43829.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 04 March 2010 2:59:45 pm Terry wrote:
> On Fri, Feb 26, 2010 at 4:52 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
wrote:
> > On Fri, Feb 26, 2010 at 3:46 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> Terry <td3201(at)gmail(dot)com> writes:
> >>> I am somewhat confused.  My app is detecting it as a serial data type
> >>> but describing the table shows that its an integer.  What am I
> >>> missing?
> >>>
> >>> dssystem=# \d clients_event_log
> >>>                                        Table "public.clients_event_log"
> >>>      Column     |          Type           |
> >>>  Modifiers
> >>> ----------------+-------------------------+----------------------------
> >>>--------------------------------------- ev_id          | integer        
> >>>         | not null default
> >>> nextval('clients_event_log_ev_id_seq'::regclass)
> >>
> >> Nothing.  "Serial" is nothing but a shorthand for an integer column
> >> with a default like that.
> >
> > And a dependency for the sequence on the column.  I wonder if Terry's
> > application is sorting through dep info to make a bad decision...
>
> I am back to this particular problem. I found a workaround, that is
> very poor, which is to create a new table to present the column as an
> integer type rather than serial. What do you mean by a dependency?
> What is dependent on what? Are there any functions that would create
> a new column in the output as an integer type based on the value in
> another column?

The dependency is the sequence "clients_event_log_ev_id_seq". When you use the
serial type it creates an integer column with a dependency on the sequence.

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Roffler 2010-03-05 15:22:05 Re: Xpath Index in PostgreSQL
Previous Message akp geek 2010-03-05 15:14:16 Re: FSM and VM file