[GENERAL] Undefined Reference

2017-09-04 Thread Stefan Wagner
I'm apologizing in advance for the double post. Since my first one wasn't composed very thoughtfull and hasn't gotten any responses.

 

Im new to postgresql and trying to create a new Clause in the source code. Thanks to some advice in this Mailing List I've been able to start coding.

 

I'm using Windows 7 as a operating System and building the source code with MSYS2 MingGw.

 

It seems I'm missing something very simple in the Libary Files looking at the Error Code.

But since im new to this it really feels like a Roadblock can someone give me advice what to do or where to add the missing references?

 

I added a File src\backend\executor\nodeDelFil which includes #include "utils/tuplewindow.h" but I get following Error:

 


x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement

-Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard

-O2 -L../../src/port -L../../src/common -Wl,--allow-multiple-definition -Wl,--disable-auto-import  -Wl,--as-needed

  -Wl,--stack=4194304 -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a access/brin/brin.o access/brin/brin_pageops.o...

... ../../src/common/libpgcommon_srv.a win32ver.o -lws2_32 -lm -lws2_32 -lsecur32 -o postgres.exe
make[2]: *** [Makefile:86: postgres] Error 1..

..executor/nodeDelFil.o:nodeDelFil.c:(.text+0x22): undefined reference to `tuplewindow_end'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x43): undefined reference to `tuplewindow_begin'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x306): undefined reference to `tuplewindow_rewind'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x324): undefined reference to `tuplewindow_ateof'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x336): undefined reference to `tuplewindow_gettupleslot'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x365): undefined reference to `tuplewindow_movenext'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x36d): undefined reference to `tuplewindow_ateof'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x385): undefined reference to `tuplewindow_puttupleslot'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x3a9): undefined reference to `tuplewindow_removecurrent'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x3da): undefined reference to `tuplewindow_setinsertrank'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x413): undefined reference to `tuplewindow_setinsertrank'
collect2.exe: error: ld returned 1 exit status

 

Every Help would be greatly appreciated.



[GENERAL] ERROR: Undefined Reference to

2017-08-31 Thread Stefan Wagner
It seems im missing some References but I don't know where to add them.

Here is my Error Code while using $source/configure --host=x86_64-w64-mingw32 --prefix=$dist && make && make install:



 

x86_64-w64-mingw32-gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -L../../src/port -L../../src/common -Wl,--allow-multiple-definition -Wl,--disable-auto-import  -Wl,--as-needed   -Wl,--stack=4194304 -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a access/brin/brin.o access/brin/brin_pageops.o access/brin/brin_revmap.o access/brin/brin_tuple.o...

... utils/fmgrtab.o ../../src/timezone/localtime.o ../../src/timezone/strftime.o ../../src/timezone/pgtz.o ../../src/port/libpgport_srv.a ../../src/common/libpgcommon_srv.a win32ver.o -lws2_32 -lm -lws2_32 -lsecur32 -o postgres.exe
make[2]: *** [Makefile:86: postgres] Fehler 1
make[2]: Verzeichnis „/c/builds3/postgres/source/src/backend“ wird verlassen
make[1]: *** [Makefile:36: all-backend-recurse] Fehler 2
make[1]: Verzeichnis „/c/builds3/postgres/source/src“ wird verlassen
make: *** [GNUmakefile:11: all-src-recurse] Fehler 2
commands/explain.o:explain.c:(.text+0x9fb): undefined reference to `Preferring_method_name'
commands/explain.o:explain.c:(.text+0xb22): undefined reference to `Preferring_window_policy_name'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x22): undefined reference to `tuplewindow_end'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x43): undefined reference to `tuplewindow_begin'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x113): undefined reference to `Preferring_option_get_window_policy'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x1a1): undefined reference to `ExecPreferringCacheCompareFunctionInfo'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x306): undefined reference to `tuplewindow_rewind'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x324): undefined reference to `tuplewindow_ateof'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x336): undefined reference to `tuplewindow_gettupleslot'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x365): undefined reference to `tuplewindow_movenext'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x36d): undefined reference to `tuplewindow_ateof'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x385): undefined reference to `tuplewindow_puttupleslot'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x3a9): undefined reference to `tuplewindow_removecurrent'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x3da): undefined reference to `tuplewindow_setinsertrank'
executor/nodeDelFil.o:nodeDelFil.c:(.text+0x413): undefined reference to `tuplewindow_setinsertrank'
executor/nodePreferring.o:nodePreferring.c:(.text+0xf8): undefined reference to `tuplewindow_end'
executor/nodePreferring.o:nodePreferring.c:(.text+0x116): undefined reference to `tuplewindow_begin'
executor/nodePreferring.o:nodePreferring.c:(.text+0x78f): undefined reference to `Preferring_option_get_window_policy'
executor/nodePreferring.o:nodePreferring.c:(.text+0x852): undefined reference to `ExecPreferringCacheCompareFunctionInfo'
executor/nodePreferring.o:nodePreferring.c:(.text+0xac1): undefined reference to `tuplewindow_clean'
executor/nodePreferring.o:nodePreferring.c:(.text+0xd9c): undefined reference to `tuplewindow_timestampcurrent'
executor/nodePreferring.o:nodePreferring.c:(.text+0xdb5): undefined reference to `tuplewindow_movenext'
executor/nodePreferring.o:nodePreferring.c:(.text+0xdc1): undefined reference to `tuplewindow_ateof'
executor/nodePreferring.o:nodePreferring.c:(.text+0xe8b): undefined reference to `tuplewindow_rewind'
executor/nodePreferring.o:nodePreferring.c:(.text+0xea1): undefined reference to `tuplewindow_ateof'
executor/nodePreferring.o:nodePreferring.c:(.text+0xec2): undefined reference to `tuplewindow_gettupleslot'
executor/nodePreferring.o:nodePreferring.c:(.text+0xf99): undefined reference to `tuplewindow_end'
executor/nodePreferring.o:nodePreferring.c:(.text+0x1297): undefined reference to `tuplewindow_rewind'
executor/nodePreferring.o:nodePreferring.c:(.text+0x1301): undefined reference to `tuplewindow_rewind'
executor/nodePreferring.o:nodePreferring.c:(.text+0x132a): undefined reference to `tuplewindow_gettupleslot'
executor/nodePreferring.o:nodePreferring.c:(.text+0x1357): undefined reference to `tuplewindow_movenext'
executor/nodePreferring.o:nodePreferring.c:(.text+0x135f): undefined reference to `tuplewindow_ateof'
executor/nodePreferring.o:nodePreferring.c:(.text+0x136b): undefined reference to `tuplewindow_has_freespace'
executor/nodePreferring.o:nodePreferring.c:(.text+0x1413): undefined reference to `tuplewindow_rewind'
executor/nodePreferring.o:nodePreferring.c:(.text+0x1435): undefined reference to `tuplewindow_ateof'
executor/nodePreferring.o:nodePreferring.c:(.text+0x1447): undefined reference to `tuplewindow_gettupleslot'
executor/nodePreferring.o:nodePreferring.c:(.text+0x146c): 

[GENERAL] Adding a new Clause in the Source Code

2017-08-14 Thread Stefan Wagner

Recently I started to take a look at Postgresql on the Source Level. I wanted to extend the Parser by a simple Clause which isn't as easy as I expected.
Hence I'm here asking for help. This might seem trivial for a Person which is able to answer this Question but please take a moment of your time and help a
fellow coder out. 

 

My Objective is to add a new Clause after the WHERE Clause in a SELECT Statement which modifys the order of my result. I allready invested some time to get familar
with the Bison part in source\src\backend\parser so adding new Keywords seems possible. The question now is in which Files do I need to add what to make it work.
Yes this question seems a bit broad but Information I found was confusing or outdated.

 

I would really appreciate if someone could hack me a quick example of a new clause lets call it ADDITIONAL with Keywords HIGH, LOW to order columns. I just want the construct. What
the Keywords accomplish and the Algorithm is something I'm gonna try to figure out on my own. I just need to know in which File and which Line I need to enter my Code.

 

I appreciate any help I can get and if needed I'll add some additional Information.