Re: Recursive Arrays 101 - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Recursive Arrays 101
Date
Msg-id 562E9F73.8040505@aklaver.com
Whole thread Raw
In response to Re: Recursive Arrays 101  (David Blomstrom <david.blomstrom@gmail.com>)
Responses Re: Recursive Arrays 101  (David Blomstrom <david.blomstrom@gmail.com>)
List pgsql-general
On 10/26/2015 02:26 PM, David Blomstrom wrote:
> Here's what it looks like now:
>
> CREATE TABLE public.gz_life_mammals
> (
>    id integer NOT NULL,
>    taxon text NOT NULL,
>    parent text NOT NULL,
>    slug text,
>    namecommon text,
>    plural text,
>    extinct smallint NOT NULL,
>    rank smallint NOT NULL,
>    key smallint NOT NULL,
>    CONSTRAINT "Primary Key" PRIMARY KEY (id),
>    CONSTRAINT "Unique Key" UNIQUE (taxon)
> )
> WITH (
>    OIDS=FALSE
> );
> ALTER TABLE public.gz_life_mammals
>    OWNER TO postgres;
>
> * * * * *
>
> I don't even have a clue what OIDS=FALSE means;

That is not necessary. OIDs on user tables are no longer automatically
included, so that is FALSE by default. OID is object id. In the old days
it used to be a default hidden column on all tables. That turned out not
to be a good idea, so they are no longer there for user tables. You will
see then on system tables if you specifically do select oid, * from
some_system_table.

I haven't read up on it
> yet. It's just there by default. I haven't figured out how to change the
> NULL value for any columns, other than toggle back and forth between
> NULL and NOT NULL.

Is this what you are talking about?:

ALTER TABLE some_table ALTER COLUMN SET NOT NULL

or

ALTER TABLE some_table ALTER COLUMN DROP NOT NULL

http://www.postgresql.org/docs/9.4/interactive/sql-altertable.html

>
> To assign a user, would I just ask it to associate a table with my
> username? Can I do that with pgAdmin3?
>
> Thanks.


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: David Blomstrom
Date:
Subject: Importing CSV File
Next
From: Gavin Flower
Date:
Subject: Re: Recursive Arrays 101