Re: inherited table and rules

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Scott Frankel <leknarf(at)pacbell(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: inherited table and rules
Date: 2005-03-23 14:28:47
Message-ID: 20050323061445.W72718@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 22 Mar 2005, 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;

It's actually UPDATE ONLY people (I was using the select version in my
message as a shorthand, sorry).

> What is the proper syntax for specifying FROM ONLY in the inheritance
> statement?

You don't need to do it in the inheritance clause, and I'm not sure what
it would do if it were allowed.

> 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? ;)

I think it's like grand unified configuration. It's the configuration
variables in the conf file and SETs and so on.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message FERREIRA William (COFRAMI) 2005-03-23 14:39:30 Re: pl/perl problem
Previous Message Sean Davis 2005-03-23 14:21:50 Re: PLPGSQL