Odd syntax - Mailing list pgsql-admin

From Campbell, Lance
Subject Odd syntax
Date
Msg-id B10E6810AC2A2F4EA7550D072CDE8760CDDC7F@SAB-FENWICK.sab.uiuc.edu
Whole thread Raw
List pgsql-admin

I noticed a couple of odd syntax issues today as I set up an SQL script.

 

1)       The following does not work:

 

ALTER SEQUENCE somesequence OWNER TO xyz;

 

Instead you have to use:

 

ALTER TABLE somesequence OWNER TO xyz;

 

But if you drop a sequence the syntax is:

 

DROP SEQUENCE somesquence;

 

Is there a reason ALTER SEQUENCE could not have been used instead of ALTER TABLE?

 

 

2)       I also noticed I cannot create a sequence targeting a particular tablespace.  Example:

 

CREATE SEQUENCE somesequence

  INCREMENT 1

  MINVALUE 1

  MAXVALUE 9223372036854775807

  START 1

  CACHE 1

  TABLESPACE xyz;

 

Why is this?  I thought that when you created a sequence you were in a sense creating a special predefined table in the background.

 

Thanks,

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu

 

pgsql-admin by date:

Previous
From: "Milen A. Radev"
Date:
Subject: Re: POSTGRESQL LOG
Next
From: "Hyatt, Gordon"
Date:
Subject: Moving a tablespace