Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 01:39 AM
Nikola Milutinovic
Guest
 
Posts: n/a
Default PgSQL 8.0.0 - contributed: problem compiling

Hi all.

I've managed to get 8.0.0 up and running. Now I'm compiling some
contributed software and I hit a show stopper. Contrib - DBSize

Papa-Legba:/home/r/root/5.1/postgresql-8.0.0beta1/contrib/dbsize# gmake
; gmake install
sed 's,MODULE_PATHNAME,$libdir/dbsize,g' dbsize.sql.in >dbsize.sql
cc -std -ieee -pthread -O3 -c99 -I. -I../../src/include -pthread -c
-o dbsize.o dbsize.c
cc: Error: dbsize.c, line 58: In this statement, "GetDatabasePath"
expects 2 arguments, but 1 are supplied. (toofewargs)
dbpath = GetDatabasePath(dbid);
-----------------^
gmake: *** [dbsize.o] Error 1
cc -std -ieee -pthread -O3 -c99 -I. -I../../src/include -pthread -c
-o dbsize.o dbsize.c
cc: Error: dbsize.c, line 58: In this statement, "GetDatabasePath"
expects 2 arguments, but 1 are supplied. (toofewargs)
dbpath = GetDatabasePath(dbid);
-----------------^
gmake: *** [dbsize.o] Error 1

Inspecting the "./src/include/catalog/catalog.h" I can see that it takes
two arguments:

extern char *GetDatabasePath(Oid dbNode, Oid spcNode);

The problematic code segment is:

Datum database_size(PG_FUNCTION_ARGS)
{
Name dbname = PG_GETARG_NAME(0);

Oid dbid;
char *dbpath;
DIR *dirdesc;
struct dirent *direntry;
int64 totalsize;

dbid = get_database_oid(NameStr(*dbname));
if (!OidIsValid(dbid))
ereport(ERROR, (errcode(ERRCODE_UNDEFINED_DATABASE),
errmsg("database \"%s\" does not exist",
NameStr(*dbname))));

dbpath = GetDatabasePath(dbid);

What should be the change in this code segment? "libPQ" docs are not
informative...

Nix.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

  #2  
Old November 23rd, 2005, 01:39 AM
Joe Conway
Guest
 
Posts: n/a
Default Re: PgSQL 8.0.0 - contributed: problem compiling

Nikola Milutinovic wrote:[color=blue]
> Hi all.
>
> I've managed to get 8.0.0 up and running. Now I'm compiling some
> contributed software and I hit a show stopper. Contrib - DBSize[/color]

I believe this has been fixed in current cvs (works for me now). You can
try checking out cvs HEAD, wait for beta2, or apply the diff to your
local copy of beta1:
http://developer.postgresql.org/cvsw...1=1.10;r2=1.11

HTH,

Joe

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

  #3  
Old November 23rd, 2005, 01:39 AM
Richard Poole
Guest
 
Posts: n/a
Default Re: PgSQL 8.0.0 - contributed: problem compiling

On Sun, Aug 15, 2004 at 11:03:55AM +0200, Nikola Milutinovic wrote:[color=blue]
> Hi all.
>
> I've managed to get 8.0.0 up and running. Now I'm compiling some
> contributed software and I hit a show stopper. Contrib - DBSize[/color]

This has been fixed in an update committed since the beta was wrapped:
http://archives.postgresql.org/pgsql...8/msg00203.php


Richard

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles