mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Add \ir command to psql.
\ir is short for "include relative"; when used from a script, the supplied pathname will be interpreted relative to the input file, rather than to the current working directory. Gurjeet Singh, reviewed by Josh Kupershmidt, with substantial further cleanup by me.
This commit is contained in:
@ -74,6 +74,17 @@ skip_drive(const char *path)
|
||||
#define skip_drive(path) (path)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* has_drive_prefix
|
||||
*
|
||||
* Return true if the given pathname has a drive prefix.
|
||||
*/
|
||||
bool
|
||||
has_drive_prefix(const char *path)
|
||||
{
|
||||
return skip_drive(path) != path;
|
||||
}
|
||||
|
||||
/*
|
||||
* first_dir_separator
|
||||
*
|
||||
|
Reference in New Issue
Block a user