Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias command implementation #36

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Commits on Oct 17, 2019

  1. First partial implementation of the alias command.

    The idea is that this command allows the manipulation of PostgreSQL alias
    names, stored as links into an `/alias` directory in the `PGENV_ROOT` directory.
    Subcommands `add` and `remove` checks for the existance of the links
    and create or delete such links int he alias directory.
    
    Changes to the `versions` command in order to show also the aliases.
    Now, after the directory output for each version, all aliases are printed out.
    This changes the format of the `versions` output.
    fluca1978 committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    7ed9fe0 View commit details
    Browse the repository at this point in the history
  2. Created a function to handling the versions specified as an alias.

    This way a user can specify a version to use/remove as an alias, and
    the script will produce (normalize) the right version to use for disk layout.
    
    Added a function to remove all the aliases of a version when deleting
    an installation.
    fluca1978 committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    0c977e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f8e0a6e View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2019

  1. Configuration menu
    Copy the full SHA
    226a8d9 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2019

  1. Configuration menu
    Copy the full SHA
    baaf6b3 View commit details
    Browse the repository at this point in the history
  2. First version with aliases and multiple installations.

    THIS BREAKS BACKWARD COMPATIBILITY.
    
    Now each instance is installed into a directory that includes
    a timestamp and is collected into a directory named by the PostgreSQL version,
    for instance
     $PGENV_ROOT/
          pgsql-12.0/
                  pgsql-12.0-2019-10-21-14-15-35
                  pgsql-12.0-2019-10-21-08-36-35
         pgsql-11.5/
                  pgsql-11.5-2019-10-20-14-15-35
                  pgsql-11.5-2019-10-20-08-36-35
    
    and each instance is automatically assigned two aliases:
    - one with the version (12.0 for example)
    - one with the full timestamp (pgsql-12.0-2019-10-21-14-15-35).
    
    This means that the alias with the single PostgreSQL version (e.g., 12.0)
    works only for the first instance installed.
    
    All other commands have been refactored to use the alias as input.
    
    Remove sed dependency in pgenv_versions.
    
    Fix pgenv_versions to allow '*' on current instance.
    fluca1978 committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    cb71482 View commit details
    Browse the repository at this point in the history
  3. Refactoring of the alias commands.

    The `alias remove` prevents the user to lock out removing all the aliases
    of an instance.
    The `add` command allows for alias creation.
    fluca1978 committed Oct 21, 2019
    Configuration menu
    Copy the full SHA
    5cd650b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1321713 View commit details
    Browse the repository at this point in the history