473,378 Members | 1,397 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Sequence Meta Data from System Catalogs?

Hi,

I am trying to get the meta data of a sequence that I created out from
the system catalogs, so that I can reconstruct the SQL Statement. I
need this for pre and post PG 7.3 ... or either. I have read through
the documentation and the past postings and can't seem to find any
reference to the topic.

I currently can execute this statement to create the Sequence ...

CREATE SEQUENCE FULL_SEQUENCE
INCREMENT 2
MINVALUE 1
MAXVALUE 20000
START 7 CACHE 5 CYCLE

Then, execute this statement to get a name list of the existing
sequence ...

SELECT *
FROM PG_CLASS
WHERE RELKIND = 'S'
AND UPPER(RELNAME) = 'FULL_SEQUENCE'

But, the only data that the pg_class table provides is the name of the
Sequence. It doesn't provide me with the INCREMENT, MINVALUE,
MAXVALUE, START, CACHE or CYCLE values. From the documentation there
doesn't seem to be any 'related' foreign tables that have any extra
data.

Is this information in the System Tables?
thanks
-John
Jul 19 '05 #1
1 3101
Jo****@aquafold.com (JohnLH) wrote in message news:<bc**************************@posting.google. com>...
Hi,

I am trying to get the meta data of a sequence that I created out from
the system catalogs, so that I can reconstruct the SQL Statement. I
need this for pre and post PG 7.3 ... or either. I have read through
the documentation and the past postings and can't seem to find any
reference to the topic.

I currently can execute this statement to create the Sequence ...

CREATE SEQUENCE FULL_SEQUENCE
INCREMENT 2
MINVALUE 1
MAXVALUE 20000
START 7 CACHE 5 CYCLE

Then, execute this statement to get a name list of the existing
sequence ...

SELECT *
FROM PG_CLASS
WHERE RELKIND = 'S'
AND UPPER(RELNAME) = 'FULL_SEQUENCE'

But, the only data that the pg_class table provides is the name of the
Sequence. It doesn't provide me with the INCREMENT, MINVALUE,
MAXVALUE, START, CACHE or CYCLE values. From the documentation there
doesn't seem to be any 'related' foreign tables that have any extra
data.

Is this information in the System Tables?
thanks
-John


Simple. A sequence is implemented as a table with the same name. So
all you need to do is:

select * from FULL_SEQUENCE;
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Donald Firesmith | last post by:
Are html tags allowed within meta tags? Specifically, if I have html tags within a <definition> tag within XML, can I use the definition as the content within the <meta content="description> tag? ...
30
by: Anon | last post by:
If Http headers specify the character encoding, what is the point of the Meta tag specifying it?
2
by: DB2 Convert | last post by:
Hi, I can't think of how data can be lost other than losing active logs and some of the archive logs Does anyone has a list of mishaps that can cause data in DB2 world go missing? I am...
3
by: PJ6 | last post by:
Can't find anywhere in the docs that mentions a way to programmatically get a page's meta tag collection. Reflection finds nothing in attributes. Can't find anything in a page instance, either. Are...
1
by: elein | last post by:
Can someone explain the reasoning behind not allowing a user table to contain a foreign key of a system table? For example: create table myusers ( login text references...
13
by: momobear | last post by:
hi, is there a way to let python operate on sequence of int or short? In C, we just need declare a point, then I could get the point value, just like: short* k = buffer, //k is a point to a...
3
by: Rick | last post by:
I have a base class that inherits from System.Web.UI.Page that I need to include the ability to read the inheriting class/page meta tags. I can't find any methods in the System.Web.UI.Page members...
0
by: rval | last post by:
I have this schema while teh following sequence <complexType name="SetOfTasks" mixed="true"> <sequence> <choice minOccurs="1" maxOccurs="unbounded"> <element minOccurs="0"...
7
by: aj | last post by:
DB2 LUW 8.1 fixpak 14 Linux Red Hat AS I'm trying to get the maximum value of a sequence. Because of the way the sequence is used (on several tables comprising a fat view), its too expensive...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.