Skip to content

pg_ascii_movie is a PostgreSQL extension to watch ascii movies.

Notifications You must be signed in to change notification settings

yamatattsu/pg_ascii_movie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pg_ascii_movie

pg_ascii_movie is a PostgreSQL extension to watch ascii movies.

This was created by Tatsuro Yamada for Advent calendar 2021.

Contents

This README contains the following sections:

  1. Usage
  2. Installation Requirements
  3. Installation
  4. Credits

1 Usage

Run the following command on psql after Installation. postgres=# call play_sw1();

Screen shot:

2 Installation Requirements

  • file_fdw

3 Installation

  1. Clone the repository and Install

    $ git clone https://github.com/yamatattsu/pg_ascii_movie
    $ cd pg_ascii_movie
    $ make -s install
    
  2. Create extensions and Set-up foreign table

    $ psql
    CREATE EXTENSION file_fdw;
    CREATE EXTENSION pg_ascii_movie;
    \dx
    
    CREATE SERVER movies FOREIGN DATA WRAPPER file_fdw;
    
    CREATE FOREIGN TABLE sw1 (
        data text
    ) SERVER movies
    OPTIONS ( filename 'path/to/pg_ascii_movie/movies/sw1.txt');
    

    Note: to use Absolute path is better for the filename

  3. Test for the foreign table

    select * from sw1 limit 1;
    
  4. Enjoy watching Star Wars Episode IV

    call play_sw1();
    

4 Credits

About

pg_ascii_movie is a PostgreSQL extension to watch ascii movies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published