GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - efritz/gostgres

BranchesTags
Open more actions menu

Latest commit

 

History

239 Commits
239 Commits

Folders and files

NameName
Last commit message
Last commit date
cmd/repl
cmd/repl
 
 
internal
internal
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
TODO.md
TODO.md
 
 
aidev.ignore
aidev.ignore
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

Gostgres

Postgres in Go as a learning exercise.

Try me out

Simply run go build ./cmd/repl && ./repl to drop into a psql-like shell where you can issue SQL commands to an in-memory database.

This shell starts with an empty tablespace, but a sample database based on pagila can be loaded via load sample.

$ go build ./cmd/repl && ./repl
gostgres ❯ load sample
gostgres ❯ SELECT f.title, f.rating, c.name
gostgres ❯ FROM film f
gostgres ❯ JOIN film_category fc ON fc.film_id = f.film_id
gostgres ❯ JOIN category c ON c.category_id = fc.category_id
gostgres ❯ WHERE rating = 'R'
gostgres ❯ ORDER BY f.title
gostgres ❯ LIMIT 20;
         title        | rating |     name
----------------------+--------+-------------
      AIRPORT POLLOCK |      R |      Horror
           ALONE TRIP |      R |       Music
  AMELIE HELLFIGHTERS |      R |       Music
      AMERICAN CIRCUS |      R |      Action
 ANACONDA CONFESSIONS |      R |   Animation
     ANALYZE HOOSIERS |      R |      Horror
    ANYTHING SAVANNAH |      R |      Horror
 APOCALYPSE FLAMINGOS |      R |         New
     ARMY FLINTSTONES |      R | Documentary
          BADMAN DAWN |      R |      Sci-Fi
     BANGER PINOCCHIO |      R |       Music
       BEAR GRACELAND |      R |    Children
      BEAST HUNCHBACK |      R |    Classics
       BEVERLY OUTLAW |      R |      Sci-Fi
        BOOGIE AMELIE |      R |       Music
        BOULEVARD MOB |      R |         New
      BROOKLYN DESERT |      R |     Foreign
  BROTHERHOOD BLANKET |      R | Documentary
        BUBBLE GROSSE |      R |      Sports
      CAMPUS REMEMBER |      R |      Action
(20 rows)

Time: 187.273833ms

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.