473,231 Members | 1,661 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,231 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 3094
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: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.