Re: select count() out of memory

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Steve Crawford" <scrawford(at)pinpointresearch(dot)com>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, tfinneid(at)student(dot)matnat(dot)uio(dot)no, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: select count() out of memory
Date: 2007-10-25 17:37:37
Message-ID: dcc563d10710251037h562d7a3eu712865bfeaf030be@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/25/07, Steve Crawford <scrawford(at)pinpointresearch(dot)com> wrote:
> Alvaro Herrera wrote:
> ...
> >
> > You can use CREATE TABLE LIKE, which copies the definition but does not
> > set the inheritance.
> >
>
> Well, sort of.
>
> Unless I'm using it incorrectly it only copies the basic column
> definitions and, as optionally specified, defaults and some of the
> constraints.
>
> Primary key constraints are lost as CREATE TABLE newtable (LIKE
> oldtable) does not create any indexes including those necessary for the
> primary key.
>
> I don't know how foreign-key constraints are handled as I haven't used
> this form of CREATE TABLE where foreign keys are involved.

Neither inheritance nor creating LIKE will inherit primary keys.

Foreign keys will not be inherited by either method either.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2007-10-25 17:43:39 Re: subversion support?
Previous Message brian 2007-10-25 17:30:46 Re: subversion support?