473,800 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I list the schema for a table or procedure?

How do I list the schema for a table or procedure? Is there a command
I can do in psql to list this, or do I have to join a series of tables
to see that?
Nov 23 '05 #1
1 1526
Google Mike wrote:
How do I list the schema for a table or procedure? Is there a command
I can do in psql to list this, or do I have to join a series of tables
to see that?


You can do a "pg_dump -s <DBNAME>" to see the full schema of the
database. To see just a table of the database issue the command
"pg_dump -st <TABLENAME> <DBNAME>". These are run from the command line
and not within the psql shell.

Within psql you could use "\d <TABLENAME>" to describe a specific table.

Nov 23 '05 #2

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

Similar topics

1
5077
by: Ping | last post by:
I have sys to grant the following to a schema: (login as sys from sqlplus 8.1.6 on linux) grant select any table to a; grant execute on dbms_alert to a; grant create any procedure to a; when i login as a, i still can NOT do a select on the table
1
9910
by: Not Me | last post by:
Hi, I'm sure this is a common problem.. to create a single field from a whole column, where each row would be separated by a comma. I can do this for a specified table, and column.. and I've created a function using VBA to achieve a more dynamic (and very slow) solution.. so I would like to implement it using a user defined function in sql server. The problems I'm facing are, that I can't use dynamic sql in a
8
4339
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. Basically I want to say: If fk_ID is in list then do these statements to that record
15
5742
by: AK | last post by:
Once upon a time there was a table: CREATE TABLE VENDOR(VENDOR_ID INT, NAME VARCHAR(50), STATE CHAR(2))@ in a while the developers realized that a vendor may be present in xseveral states, so the structure was changed to CREATE TABLE VENDOR(VENDOR_ID INT, NAME VARCHAR(50), STATE_LIST VARCHAR(150))@
16
4311
by: Bob Stearns | last post by:
The syntax diagram of DROP SCHEMA requires RESTRICT. Is there an easy way to drop an old, unnecessary, but populated schema?
13
26589
by: N. Graves | last post by:
Thanks for taking time to read my questions. I'm looking for a way in Access that I could run a query that would return table schema information. Specifically I need to get the column name, data type and size of the column. In SQL there is a stored procedure that does this 'SP_Help <table Name>. This command gives me more than I need but I hope the example will help. I'm writing an ASP search page. I'm hoping to send the page a...
3
13088
by: %NAME% | last post by:
is there a way to write a script (not stored procedure) that looks for all the objects (triggers, events, materialized views, indexes, stats, tables) created by one user and remove them all? thanks a lot
1
4186
by: Orit | last post by:
Hi . I am creating an ASP.NET 2.0 web site and have the following problem : 1. I have a GridView which bound to the object data source. 2. This object data source is SQL Table adapter that I added to the data set via IDE . 3. The method GetData of this table adapter uses existing stored procedure on my SQL 2005 server. 4. Everything worked fine , until I made a changes to the stored
4
3175
by: sumanta123 | last post by:
Dear All, I have two schema in my network.Let say one is AMS and Another is AMSDATA. Both contains same table.Let say both the schema have employee table. But the schema of AMSDATA's employee table data will reflect in AMS schema of Emplyee table. Means when i execute the procedure the schema of AMSDATA's employee table data will always updated in schema of AMS's employee table data. Could please guide me for my requiremnts query ...
0
10501
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
10273
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...
1
10250
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
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...
0
6811
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();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2944
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.