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