Skip site navigation (1) Skip section navigation (2)

Create Table Question...

From: Jerry LeVan <jerry(dot)levan(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org general" <pgsql-general(at)postgresql(dot)org>
Subject: Create Table Question...
Date: 2011-01-31 16:09:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
The docs ( 9.0.2) for create table asserts that a data type representing a row of 
the table is automatically created.

Tain't clear to me what this means...

Here is a fragment of sql that I frequently use:
insert into checks (select *
   from dblink('select * from checks where date >=''1/1/2011''')
   as (date date,
       amount numeric(9,2),
        tranid text,
       source text,
       memo text,
       status text,
       category text
      ) );
The stuff after the 'as' is a description of the
rows of the table checks.

Could I shortened the above by using the automatically created row type of
the table checks?




pgsql-general by date

Next:From: Tom LaneDate: 2011-01-31 16:13:55
Subject: Re: Update existing system explicit cast to make it implicit
Previous:From: Steve WhiteDate: 2011-01-31 16:09:08
Subject: include source file from another language into function body?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group