Hi,
I can't seem to retrieve a comment on a table column. The following copy from
psql should I think return a comment:
=============== =====
mydatabase=> COMMENT ON COLUMN car.manufacture r IS 'manufacturer name';
COMMENT
mydatabase=> SELECT relnamespace FROM pg_class WHERE relname='car';
relnamespace
--------------
2200
(1 row)
mydatabase=> SELECT col_description (2200,1);
col_description
-----------------
(1 row)
=============== =====
i.e. it just returns a blank row.
The col_description is described at http://www.postgresql.org/docs/7.3/s...ions-misc.html
The field number supplied above '1' is right if the first col in a table is
'0', in fact no number I've tried returns anything.
I can't seem to find any examples at all on the web about retrieving column
COMMENTs. Has anyone done this? Postgres version is 7.3
Regards,
Oliver Kohll
GT webMarque
--
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly 3 6507
On Sun, Oct 26, 2003 at 10:02:22PM +0000, Oliver Kohll wrote: I can't seem to retrieve a comment on a table column. The following copy from psql should I think return a comment:
mydatabase=> SELECT relnamespace FROM pg_class WHERE relname='car'; relnamespace -------------- 2200 (1 row)
Try using relfilenode instead of relnamespace.
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Hay que recordar que la existencia en el cosmos, y particularmente la
elaboración de civilizaciones dentre de él no son, por desgracia,
nada idílicas" (Ijon Tichy)
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
On Sunday 26 October 2003 23:03, Alvaro Herrera wrote: On Sun, Oct 26, 2003 at 10:02:22PM +0000, Oliver Kohll wrote: I can't seem to retrieve a comment on a table column. The following copy from psql should I think return a comment:
mydatabase=> SELECT relnamespace FROM pg_class WHERE relname='car'; relnamespace -------------- 2200 (1 row)
Try using relfilenode instead of relnamespace.
Great, thanks Alvaro. The webpage I found the original code in must have been
wrong but that's it.
Oliver
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Alvaro Herrera <al******@dcc.u chile.cl> writes: On Sun, Oct 26, 2003 at 10:02:22PM +0000, Oliver Kohll wrote: I can't seem to retrieve a comment on a table column. The following copy from psql should I think return a comment:
mydatabase=> SELECT relnamespace FROM pg_class WHERE relname='car'; relnamespace -------------- 2200 (1 row)
Try using relfilenode instead of relnamespace.
Actually what he wants is the oid. relfilenode is not relevant to
anything except the table's disk file name.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Shino |
last post by:
Hi,
Can anyone help with this error: "ORA-00904: invalid column name"?
Thanks!
SQL> create view PPFa as
2 SELECT L.UserID AS LecID, U.Name, U.Email, I.IntakeID, S.UserID
AS StudID
3 FROM User_Lecturer L, User_Student S, TBL_Intake I, Users U
4 WHERE L.UserID=S.InitialSupervisorID And L.UserID=U.UserID And
|
by: windandwaves |
last post by:
Hi Gurus
Is there a way to retrieve the table comment from a mysql table.
In PHP My Admin, you can set the comment for a table. however, I was
wondering if you can retrieve it for use in a PHP page.
Any help greatly appreciated.
- Nicolaas
|
by: Dean Slindee |
last post by:
Does anybody have an actual example of retrieving an Image data type column
from a SQL Server table using a dataset (not a datareader)? I would like
to see the statements that would move the Image returned in the dataset to a
picture box, like:
For Each dr in ds.tables(0).rows
Pic.Image = dr("ImageColumnName") 'not this simple!
Next
Thanks,
|
by: Brett Magill |
last post by:
Hello all,
Looking for some help here. BTW, to e-mail me directly, should you
prefer, take the *nomail*. out the reply address.
I uploaded data from another program ( GNU R-2.2.0 @ www.r-project.org )
into a MySQl (4.1.X ) database. R generated the tables for me, naming
the columns, setting field types, and inserting the records. This is
good, as it was about 100MB of data across 13 tables, each with between
50 and 200 fields in...
|
by: AlveenX |
last post by:
Hi,
I am trying to pick a Guid from a data row using the following code:
foreach(DataRow row in MyDataTable.Rows)
{
(Guid)row
}
| |
by: Sanjay Pais |
last post by:
I have a table with over 1.3 million rows. I am retrieving only 20 at a time
using the with - over clauses
In query analyser, the data is retrieved in under a second.
When retrieving using the data adaptor.fill or datareader to retrieve the
data it takes over 24 seconds.
public System.Data.SqlClient.SqlDataReader List1(int PageIndex, int
PageSize, string ItemName, string UserIDs, DateTime DateStart, DateTime
DateEnd, int status,...
|
by: ADezii |
last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows() Method of the Recordset Object. This Method varies slightly from DAO to ADO, so for purposes of this discussion, we'll be talking about DAO Recordsets. The ADO approach will be addressed in the following Tip. We'll be using a Query, consisting of 5...
|
by: ADezii |
last post by:
Last Tip, we demonstrated the technique for retrieving data from a DAO Recordset, and placing it into a 2-dimensional Array using the GetRows() Method. This week, we will cover the same exact Method (GetRows()), but only as it applies to an ADO Recordset. Although there are similarities in the 2 methodologies, the ADO Method offers 2 more Optional Arguments, is a little more complex, and of course, the syntax is different in creating the...
|
by: ShadowLocke |
last post by:
Hi,
I have a table that has a column with name "comment" in it. I think that "comment" is an oracle keyword so i would like to rename this column.
when i use the syntax "alter table tablename rename column comment to somethingbetter" i get error invalid identifier. I also tried dropping the column altogether and creating a new one but i get the same error on drop.
I tried creating a new table for an example to post here but i get the...
|
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...
|
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,...
| |
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,...
|
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |