Re: inherited table and rules

From: Thomas F(dot)O'Connell <tfo(at)sitening(dot)com>
To: Scott Frankel <leknarf(at)pacbell(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Subject: Re: inherited table and rules
Date: 2005-03-23 06:17:17
Message-ID: 83374507e3551a54bd39183f39140bc1@sitening.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-03-23 06:20:50 Re: inherited table and rules
Previous Message Bruce Momjian 2005-03-23 06:12:07 Re: Move cursor