Re: inherited table and rules - Mailing list pgsql-general

From Thomas F.O'Connell
Subject Re: inherited table and rules
Date
Msg-id 83374507e3551a54bd39183f39140bc1@sitening.com
Whole thread Raw
In response to Re: inherited table and rules  (Scott Frankel <leknarf@pacbell.net>)
List pgsql-general
Did you happen to look at the manual?

http://www.postgresql.org/docs/7.4/static/sql-update.html

It pretty clearly indicates that the syntax is UPDATE ONLY table, so
try eliminating the FROM in your UPDATE example below.

http://www.postgresql.org/docs/7.4/static/sql-createtable.html

The CREATE TABLE entry also pretty clearly indicates that ONLY is not
allowed in specifying inheritance. All you need is the table name, so
try eliminating the ONLY from your CREATE example below.

GUC is the Grand Unified Configuration scheme, which was introduced in
7.1.

-tfo

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Mar 22, 2005, at 11:59 PM, Scott Frankel wrote:

> Syntax troubles.
>
> What is the proper syntax for using FROM ONLY table_name in an UPDATE
> statement?
> According to the docs, In a FROM clause, I should be able to use the
> ONLY keyword
> preceding the table name.  This throws an error:
>
>     UPDATE FROM ONLY people SET color = 'cyan' WHERE usr_pkey = 1;
>
> What is the proper syntax for specifying FROM ONLY in the inheritance
> statement?
> This also throws an error:
>
>     CREATE TABLE people_history (
>     hist_pkey    SERIAL    NOT NULL PRIMARY KEY,
>     hist_tstamp  timestamp DEFAULT CURRENT_TIMESTAMP
>     ) INHERITS ONLY (people);
>
> What does GUC stand for? ;)
>
> Thanks!
> Scott


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Move cursor
Next
From: Michael Fuhr
Date:
Subject: Re: inherited table and rules