Skip to content

Instantly share code, notes, and snippets.

View masayuki038's full-sized avatar

Masayuki Takahashi masayuki038

View GitHub Profile
; ModuleID = '/var/lib/postgresql/12/main/2832.0.bc'
source_filename = "pg"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.ExprState = type { %struct.Node, i8, i8, i64, %struct.TupleTableSlot*, %struct.ExprEvalStep*, i64 (%struct.ExprState*, %struct.ExprContext*, i8*)*, %struct.Expr*, i8*, i32, i32, %struct.PlanState*, %struct.ParamListInfoData*, i64*, i8*, i64*, i8* }
%struct.Node = type { i32 }
%struct.TupleTableSlot = type { i32, i16, i16, %struct.TupleTableSlotOps*, %struct.TupleDescData*, i64*, i8*, %struct.MemoryContextData*, %struct.ItemPointerData, i32 }
%struct.TupleTableSlotOps = type { i64, void (%struct.TupleTableSlot*)*, void (%struct.TupleTableSlot*)*, void (%struct.TupleTableSlot*)*, {}*, i64 (%struct.TupleTableSlot*, i32, i8*)*, void (%struct.TupleTableSlot*)*, void (%struct.TupleTableSlot*, %struct.TupleTableSlot*)*, %struct.HeapTupleData* (%struct.TupleTableSlot*)*, %struct.MinimalTupleData* (%struct.TupleTableSlot*)*, %struct.HeapT
/* Provide Declarations */
#include <stdarg.h>
#include <setjmp.h>
#include <limits.h>
#include <stdint.h>
#include <math.h>
#ifndef __cplusplus
typedef unsigned char bool;
#endif
; ModuleID = '/var/lib/postgresql/12/main/3410.0.bc'
source_filename = "pg"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.ExprState = type { %struct.Node, i8, i8, i64, %struct.TupleTableSlot*, %struct.ExprEvalStep*, i64 (%struct.ExprState*, %struct.ExprContext*, i8*)*, %struct.Expr*, i8*, i32, i32, %struct.PlanState*, %struct.ParamListInfoData*, i64*, i8*, i64*, i8* }
%struct.Node = type { i32 }
%struct.TupleTableSlot = type { i32, i16, i16, %struct.TupleTableSlotOps*, %struct.TupleDescData*, i64*, i8*, %struct.MemoryContextData*, %struct.ItemPointerData, i32 }
%struct.TupleTableSlotOps = type { i64, void (%struct.TupleTableSlot*)*, void (%struct.TupleTableSlot*)*, void (%struct.TupleTableSlot*)*, {}*, i64 (%struct.TupleTableSlot*, i32, i8*)*, void (%struct.TupleTableSlot*)*, void (%struct.TupleTableSlot*, %struct.TupleTableSlot*)*, %struct.HeapTupleData* (%struct.TupleTableSlot*)*, %struct.MinimalTupleData* (%struct.TupleTableSlot*)*, %struct.HeapT
; ModuleID = '/var/lib/postgresql/12/main/1985.21.bc'
source_filename = "pg"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.ExprState = type { %struct.Node, i8, i8, i64, %struct.TupleTableSlot*, %struct.ExprEvalStep*, i64 (%struct.ExprState*, %struct.ExprContext*, i8*)*, %struct.Expr*, i8*, i32, i32, %struct.PlanState*, %struct.ParamListInfoData*, i64*, i8*, i64*, i8* }
%struct.Node = type { i32 }
%struct.TupleTableSlot = type { i32, i16, i16, %struct.TupleTableSlotOps*, %struct.TupleDescData*, i64*, i8*, %struct.MemoryContextData*, %struct.ItemPointerData, i32 }
%struct.TupleTableSlotOps = type { i64, void (%struct.TupleTableSlot*)*, void (%struct.TupleTableSlot*)*, void (%struct.TupleTableSlot*)*, {}*, i64 (%struct.TupleTableSlot*, i32, i8*)*, void (%struct.TupleTableSlot*)*, void (%struct.TupleTableSlot*, %struct.TupleTableSlot*)*, %struct.HeapTupleData* (%struct.TupleTableSlot*)*, %struct.MinimalTupleData* (%struct.TupleTableSlot*)*, %struct.Heap
import sqlparse
import sys
import re
parsed = sqlparse.parse(sys.argv[1])
print(parsed[0])
for t in parsed[0].tokens:
print(type(t), t.ttype, t)