Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita1157de

Browse files
committed
Added fcvt() prot for bsdi.
Made PQsetdb() and PQfnumber() case-insensitive.Removed attempt to set table ownership via pg_dumpall.
1 parent9860926 commita1157de

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

‎src/backend/port/bsdi/port-protos.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
#ifndefPORT_PROTOS_H
1414
#definePORT_PROTOS_H
1515

16+
/*
17+
* Externals in libc that need prototypes (or at least declarations)
18+
*/
19+
20+
externchar*ecvt(double,int,int*,int*);
21+
externchar*fcvt(double,int,int*,int*);
22+
23+
1624
#include"fmgr.h"/* for func_ptr */
1725
#include"utils/dynamic_loader.h"
1826

‎src/bin/pg_dump/pg_dumpall

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ then
1212
else
1313
BS='\\'# System V
1414
fi
15-
psql -l -A -q -t|cut -d"|" -f1-2| tr'|'''| grep -v'^template1'| \
16-
whileread DATABASE USER
15+
psql -l -A -q -t| tr'|'''| grep -v'^template1'| \
16+
whileread DATABASEUSERIDUSER
1717
do
1818
echo"${BS}connect template1"
1919
echo"create database$DATABASE;"
20-
echo"update pg_database set datdba =$USER where datname = '$DATABASE';"
2120
echo"${BS}connect$DATABASE"
2221
pg_dump"$@"$DATABASE
2322
done

‎src/interfaces/libpq/fe-connect.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.34 1997/05/13 01:46:00 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.35 1997/05/20 03:38:49 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -303,7 +303,8 @@ PQsetdb(const char *pghost, const char* pgport, const char* pgoptions, const cha
303303
/* An error message from some service we call. */
304304
boolerror;
305305
/* We encountered an error that prevents successful completion */
306-
306+
inti;
307+
307308
conn= (PGconn*)malloc(sizeof(PGconn));
308309

309310
if (conn==NULL)
@@ -375,6 +376,9 @@ PQsetdb(const char *pghost, const char* pgport, const char* pgoptions, const cha
375376
((tmp=getenv("PGDATABASE")))) {
376377
conn->dbName=strdup(tmp);
377378
}elseconn->dbName=strdup(conn->pguser);
379+
for(i=0;conn->dbName[i];i++)
380+
if (isupper(conn->dbName[i]))
381+
conn->dbName[i]=tolower(conn->dbName[i]);
378382
}elseconn->dbName=NULL;
379383

380384
if (error)conn->status=CONNECTION_BAD;

‎src/interfaces/libpq/fe-exec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.28 1997/01/24 17:47:33 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.29 1997/05/20 03:39:02 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1471,7 +1471,7 @@ PQfnumber(PGresult *res, const char* field_name)
14711471
return-1;
14721472

14731473
for (i=0;i<res->numAttributes;i++) {
1474-
if (strcmp(field_name,res->attDescs[i].name)==0 )
1474+
if (strcasecmp(field_name,res->attDescs[i].name)==0 )
14751475
returni;
14761476
}
14771477
return-1;
@@ -1629,4 +1629,4 @@ PQgetisnull(PGresult *res, int tup_num, int field_num)
16291629
return1;
16301630
else
16311631
return0;
1632-
}
1632+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp