-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
419 additions
and
1,200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#pragma once | ||
|
||
// quack.c | ||
void _PG_init(void); | ||
void _PG_fini(void); | ||
|
||
// quack_internal.cpp | ||
const char * quack_duckdb_version(); | ||
// quack_hooks.c | ||
extern void quack_init_hooks(void); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include "postgres.h" | ||
|
||
#include "executor/executor.h" | ||
|
||
bool quack_execute_select(QueryDesc *query_desc, ScanDirection direction, uint64_t count); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include "duckdb.hpp" | ||
|
||
extern "C" { | ||
#include "postgres.h" | ||
#include "executor/tuptable.h" | ||
} | ||
|
||
namespace quack { | ||
duckdb::LogicalType ConvertPostgresToDuckColumnType(Oid type); | ||
void ConvertPostgresToDuckValue(Datum value, duckdb::Vector &result, idx_t offset); | ||
void ConvertDuckToPostgresValue(TupleTableSlot *slot, duckdb::Value &value, idx_t col); | ||
} // namespace quack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
CREATE SCHEMA quack; | ||
|
||
CREATE OR REPLACE FUNCTION quack.quack_am_handler(internal) | ||
RETURNS table_am_handler | ||
LANGUAGE C | ||
AS 'MODULE_PATHNAME', 'quack_am_handler'; | ||
|
||
CREATE ACCESS METHOD quack | ||
TYPE TABLE | ||
HANDLER quack.quack_am_handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
ADD_LIBRARY(extension OBJECT quack_internal.cpp | ||
quack_hooks.cpp | ||
quack_scan.cpp | ||
quack_tableam.cpp | ||
quack_utility.cpp | ||
quack_write_manager.cpp | ||
quack.cpp) | ||
ADD_LIBRARY(extension OBJECT quack.c | ||
quack_hooks.c | ||
quack_select.cpp | ||
quack_heap_scan.cpp | ||
quack_types.cpp) | ||
|
||
set(PROJECT_OBJECTS ${PROJECT_OBJECTS} "$<TARGET_OBJECTS:extension>" PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "postgres.h" | ||
|
||
#include "utils/guc.h" | ||
|
||
#include "quack/quack.h" | ||
|
||
PG_MODULE_MAGIC; | ||
|
||
static void quack_init_guc(void); | ||
|
||
void | ||
_PG_init(void) { | ||
quack_init_guc(); | ||
quack_init_hooks(); | ||
} | ||
|
||
/* clang-format off */ | ||
static void | ||
quack_init_guc(void) { | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.