Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
b8476a09
Commit
b8476a09
authored
Jan 23, 1998
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
From: Andrew Martin <martin@biochemistry.ucl.ac.uk>
psql .psqlrc file startup(Andrew)
parent
33de29fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
src/bin/psql/psql.c
src/bin/psql/psql.c
+29
-3
No files found.
src/bin/psql/psql.c
View file @
b8476a09
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.12
7 1998/01/22 18:50:22 momjian
Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.12
8 1998/01/23 19:21:11 scrappy
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -2417,6 +2417,8 @@ main(int argc, char **argv)
...
@@ -2417,6 +2417,8 @@ main(int argc, char **argv)
bool
singleSlashCmd
=
0
;
bool
singleSlashCmd
=
0
;
int
c
;
int
c
;
char
*
home
=
NULL
;
/* Used to store $HOME */
MemSet
(
&
settings
,
0
,
sizeof
settings
);
MemSet
(
&
settings
,
0
,
sizeof
settings
);
settings
.
opt
.
align
=
1
;
settings
.
opt
.
align
=
1
;
settings
.
opt
.
header
=
1
;
settings
.
opt
.
header
=
1
;
...
@@ -2556,6 +2558,30 @@ main(int argc, char **argv)
...
@@ -2556,6 +2558,30 @@ main(int argc, char **argv)
printf
(
" type
\\
g or terminate with semicolon to execute query
\n
"
);
printf
(
" type
\\
g or terminate with semicolon to execute query
\n
"
);
printf
(
" You are currently connected to the database: %s
\n\n
"
,
dbname
);
printf
(
" You are currently connected to the database: %s
\n\n
"
,
dbname
);
}
}
/*
* 20.06.97 ACRM See if we've got a /etc/psqlrc or .psqlrc file
*/
if
(
!
access
(
"/etc/psqlrc"
,
R_OK
))
HandleSlashCmds
(
&
settings
,
"
\\
i /etc/psqlrc"
,
""
);
if
((
home
=
getenv
(
"HOME"
))
!=
NULL
)
{
char
*
psqlrc
=
NULL
,
*
line
=
NULL
;
if
((
psqlrc
=
(
char
*
)
malloc
(
strlen
(
home
)
+
10
))
!=
NULL
)
{
sprintf
(
psqlrc
,
"%s/.psqlrc"
,
home
);
if
(
!
access
(
psqlrc
,
R_OK
))
{
if
((
line
=
(
char
*
)
malloc
(
strlen
(
psqlrc
)
+
5
))
!=
NULL
)
{
sprintf
(
line
,
"
\\
i %s"
,
psqlrc
);
HandleSlashCmds
(
&
settings
,
line
,
""
);
free
(
line
);
}
}
free
(
psqlrc
);
}
}
/* End of check for psqlrc files */
if
(
qfilename
||
singleSlashCmd
)
if
(
qfilename
||
singleSlashCmd
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment