How PostgreSQL parses the query and constructs the Parse Tree?

preview_player
Показать описание

Build Your Own Redis / DNS / BitTorrent / SQLite - with CodeCrafters.

In the previous video, we delved into the client connection process in the PostgreSQL database. In this video, we explored the source code to comprehend how PostgreSQL handles SQL queries from clients and processes them into a parse tree. The lexer file defines tokens like space, database, etc., while the grammar file establishes rules for query execution. The abstract syntax tree is generated to execute queries. Open Source tools like Flex and Bison are used to generate C code for lexer and grammar files. The build process compiles these files into the PostgreSQL binary for server management.

# Recommended videos and playlists

If you liked this video, you will find the following videos and playlists helpful

# Things you will find amusing

# Other socials

I keep writing and sharing my practical experience and learnings every day, so if you resonate then follow along. I keep it no fluff.

Thank you for watching and supporting! it means a ton.

I am on a mission to bring out the best engineering stories from around the world and make you all fall in
love with engineering. If you resonate with this then follow along, I always keep it no-fluff.
Рекомендации по теме
Комментарии
Автор

this encourage me, more dig in to these stuff too . Since it just open up the stuff and make the decision making stages very clear .

k.k.gayansanjeewa
Автор

@AsliEngineering: Very informative which serves as a nice refresher to lexer, parser, parse tree as well as flex, bison. Thanks for that!
Couple of suggestions:
1. In a future video on this, cover parse tree in more depth.
2. Cover PG's rewrite engine and optimizer.
Thanks again!

onkar_rajopadhye
Автор

Very Detailed video, thanks for diving in

dharins
Автор

Super informative. This got me curious about these interesting stuff again, Thanks Arpit!

mayank
Автор

This is awesome! I really love how you tell how you were able to find things like scan.l being converted to scan.c etc. It helps us in understanding how to go through the code files. Arpit, can you cover query execution plan of DBs and how can they affect performance? Or have you already covered in previous videos?

kritibindra
Автор

This video was super informative, Arpit!!!

sparsh
Автор

Deadlocks and transaction please in depth😊

physicsakhada
Автор

How did you make this Red Color Pen with sparkles in Good Notes?

SaketAnandPage
Автор

Arpit, which device and software are you using to teach? It would be helpful if you share the info

architectingme
Автор

I always find the compiler design the worst topic but the way you explain the things made me fall in love with the subject or topic.

rishabhthakur