473,748 Members | 11,145 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3121
Jo****@aquafold .com (JohnLH) wrote in message news:<bc******* *************** ****@posting.go ogle.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
3794
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? If not, is there an easy way to strip the html tags from the <definition> content before inserting the content into the meta tag?
30
4848
by: Anon | last post by:
If Http headers specify the character encoding, what is the point of the Meta tag specifying it?
2
1523
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 using archive logging and online backup
3
2469
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 they not accessible? Paul
1
1171
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 pg_catalog.pg_shadow(usename), ... );
13
1969
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 sequence point of short. short i = *k++, but python is a dynamic language, a = buffer i = ? I don't know how to continue, what's a? a seems to be a str?
3
2084
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 that provide access to do this. What is the practice to read meta information from the head section of an ASP.NET page? I am using VS.NET 1.1 C# (VB is fine).
0
1549
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" ref="tns:task1" /> <element minOccurs="0" ref="tns:task2" /> <element minOccurs="0" ref="tns:task3" /> <element minOccurs="0" ref="tns:task4" /> <element minOccurs="0" ref="tns:task5" />
7
8934
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 to do the usual select max(<col>) from <view; Is there some way for the system catalogs or some trick to get me the maximum value of the sequence?
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9537
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.