473,513 Members | 8,991 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cant view table description

4 New Member
Why if I say \d tablename; on tables in my database, does it work for certain tables but on others it gives the following error :

Expand|Select|Wrap|Line Numbers
  1. ERROR: Function pg_catalog.pg_get_indexdef(oid, integer, boolean) does not exist
  2. Unable to identify a function that satisfies the given argument types
  3. You may need to add explicit typecasts
Thanks
Aug 3 '07 #1
6 4787
michaelb
534 Recognized Expert Contributor
Can you copy and paste here the entire snippet including \d as it entered and the output it generates?
Aug 7 '07 #2
gtommo
4 New Member
If I enter :
\d waybill (or \d waybill;)
The output is :
ERROR: Function pg_catalog.pg_get_indexdef(oid, integer, boolean) does not exist. Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
Aug 13 '07 #3
michaelb
534 Recognized Expert Contributor
Looks like you have a problem; can you run these four commands and post the results they generate?

(the first command uses a lower-case L)
Expand|Select|Wrap|Line Numbers
  1. \l  
  2. select current_database();
  3. \df+  pg_get_indexdef
  4. select version();
  5.  
Aug 13 '07 #4
gtommo
4 New Member
Ok, here it is :
Expand|Select|Wrap|Line Numbers
  1. \l
  2.         List of databases
  3.    Name    |  Owner   | Encoding
  4. -----------+----------+-----------
  5.  db4002    | postgres | SQL_ASCII
  6.  garydb    | postgres | SQL_ASCII
  7.  template0 | postgres | SQL_ASCII
  8.  template1 | postgres | SQL_ASCII
  9. (4 rows)
  10.  
  11. select current_database();
  12.  current_database
  13. ------------------
  14.  db4002
  15. (1 row)
  16.  
  17. \df+  pg_get_indexdef
  18.                                                          List of functions
  19.    Schema   |      Name       | Result data type | Argument data types |  Owner   | Language |   Source code   |    Description
  20. ------------+-----------------+------------------+---------------------+----------+----------+-----------------+-------------------
  21.  pg_catalog | pg_get_indexdef | text             | oid                 | postgres | internal | pg_get_indexdef | index description
  22. (1 row)
  23.  
  24. select version();
  25.                                                         version
  26. -----------------------------------------------------------------------------------------------------------------------
  27.  PostgreSQL 7.3.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)
  28. (1 row)
  29.  
Aug 13 '07 #5
michaelb
534 Recognized Expert Contributor
I checked on the two versions of PostgreSQL I had access to:
Expand|Select|Wrap|Line Numbers
  1. testdb=# select version();
  2.                               version                              
  3. -------------------------------------------------------------------
  4.  PostgreSQL 7.3.10 on sparc-sun-solaris2.8, compiled by GCC 2.95.2
  5. (1 row)
  6.  
  7. testdb=# \df+ pg_get_indexdef
  8.                                                          List of functions
  9.  Result data type |   Schema   |      Name       | Argument data types |  Owner   | Language |   Source code   |    Description    
  10. ------------------+------------+-----------------+---------------------+----------+----------+-----------------+-------------------
  11.  text             | pg_catalog | pg_get_indexdef | oid                 | tomkins  | internal | pg_get_indexdef | index description
  12. (1 row)
  13.  
Expand|Select|Wrap|Line Numbers
  1. postgres=#  select version();
  2.                                          version
  3. ------------------------------------------------------------------------------------------
  4.  PostgreSQL 8.2.3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)
  5. (1 row)
  6.  
  7. postgres=#  \df pg_get_indexdef
  8.                             List of functions
  9.    Schema   |      Name       | Result data type |  Argument data types
  10. ------------+-----------------+------------------+-----------------------
  11.  pg_catalog | pg_get_indexdef | text             | oid
  12.  pg_catalog | pg_get_indexdef | text             | oid, integer, boolean
  13. (2 rows)
  14.  
So, the version 7.3.10, which is comparable to yours has only one function pg_get_indexdef, while version 8.2.3 has also the overloaded version, which takes three arguments.
This is exactly the implementation that were missing in your db, according to the error message you got:
ERROR: Function pg_catalog.pg_get_indexdef(oid, integer, boolean) does not exist.
The question is why there's a call to the function that should not be there?
I would take a good look at how this server was build, installed or configured. Could it be there's some version mismatch between software components?
But first check on your PATH variable and try to run command
which psql
and
psql --version
to make sure that executable you are calling is from the correct installation. I'd think there's got to be a compatibility check, but you never know. It is not unheard of to have more than one version of the database server on the machine, so your env. variables may play a critical role here.
Aug 13 '07 #6
gtommo
4 New Member
Thanks very much for that info.
If I do a 'select version()', it says PostgreSQL 7.3.4
If I do a 'psql --version', it says PostgreSQL 8.0.3
so thats a bit intersting.
I'll see what I can do, thanks.
Aug 15 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2943
by: Aaron Brockhurst | last post by:
Hi Can anyone help? I cant get my php script to insert or delete records into a mysql table. I can view them all fine but that's about it. I've checked the user permissions on mysql and...
4
8057
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure...
3
2034
by: brendan_gallagher_2001 | last post by:
Hi, I have a view(A) and I am trying to do a join on another table (B) to include only rows where date values in view A is greater than in table B. I also want the view to pick up rows in viewA...
4
3919
by: Nathan Sokalski | last post by:
When editing an ASP Table, Visual Studio does not allow me to edit it in Design View. This makes it harder to add elements, because I must add every element either by using Design View to create...
0
951
by: Prabu Subroto | last post by:
Dear my friends... I am developing a database application with postgres 7.2.x, qt on SuSE 9.1 . I am in a situation where I have to use QDataTable and I have to use QSqlCursor that support only...
5
2317
by: Sim Zacks | last post by:
I just did a dump and restore of my database and one of my views did not recreate. The error received was : pg_restore.exe: could not execute query: ERROR: column reference "pricinggroupid" is...
4
2497
by: zack | last post by:
Any help with this would be greatly appreciated, as cannot work out how to resolve. I have a report called "3_Strikes". In its 'On open' event is command to also open a criteria form popup form...
1
2965
by: Matik | last post by:
Hey, First, sorry if this post appear twice, because, I can not find my post recently send, trying to post it once again. I'm out of ideas, so, I thought, will search help here again :( I'm...
6
1535
by: mike11d11 | last post by:
I cant seem to filter down my dataset table by criteria in expression. Can someone tell me why I still have the same amount of rows after I use this filter select option. Private Sub...
4
4835
by: =?Utf-8?B?UmljaA==?= | last post by:
On a form - I have a datagridview which is docked to the entire form. The datagridview allows users to Delete and/or Add Rows. On the Form_Load event I Fill the datagridview source table with a...
0
7254
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,...
0
7153
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...
0
7373
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,...
0
7432
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...
0
5677
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,...
1
5079
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...
0
4743
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...
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
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...

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.