Git Product home page Git Product logo

pguint's People

Contributors

petere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pguint's Issues

install problem...

OS: Ubuntu server 16.04 x64

PostgreSQL 10.2...

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -We                  ndif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -f                  wrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -W                  error=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/i                  nclude/postgresql/10/server -I/usr/include/postgresql/internal -I/usr/include/x8                  6_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libx                  ml2  -I/usr/include/mit-krb5  -c -o aggregates.o aggregates.c

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -We                  ndif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -f                  wrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -W                  error=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/i                  nclude/postgresql/10/server -I/usr/include/postgresql/internal -I/usr/include/x8                  6_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libx                  ml2  -I/usr/include/mit-krb5  -c -o hash.o hash.c

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -We                  ndif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -f                  wrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -W                  error=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/i                  nclude/postgresql/10/server -I/usr/include/postgresql/internal -I/usr/include/x8                  6_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libx                  ml2  -I/usr/include/mit-krb5  -c -o hex.o hex.c

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -We                  ndif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -f                  wrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -W                  error=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/i                  nclude/postgresql/10/server -I/usr/include/postgresql/internal -I/usr/include/x8                  6_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libx                  ml2  -I/usr/include/mit-krb5  -c -o inout.o inout.c

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -We                  ndif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -f                  wrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -W                  error=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/i                  nclude/postgresql/10/server -I/usr/include/postgresql/internal -I/usr/include/x8                  6_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libx                  ml2  -I/usr/include/mit-krb5  -c -o magic.o magic.c

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -We                  ndif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -f                  wrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -W                  error=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/i                  nclude/postgresql/10/server -I/usr/include/postgresql/internal -I/usr/include/x8                  6_64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libx                  ml2  -I/usr/include/mit-krb5  -c -o misc.o misc.c

/usr/bin/python generate.py 10.2
make: /usr/bin/python: Команда не найдена
Makefile:37: ошибка выполнения рецепта для цели «operators.c»
make: *** [operators.c] Ошибка 127

Problem Installation (Ubuntu 17.10.1 x64 and PostgreSQL 9.6.6) (sorry, new problem...)

make

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fdebug-prefix-map=/build/postgresql-9.6-L_AOyy/postgresql-9.6-9.6.6=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o aggregates.o aggregates.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fdebug-prefix-map=/build/postgresql-9.6-L_AOyy/postgresql-9.6-9.6.6=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o hash.o hash.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fdebug-prefix-map=/build/postgresql-9.6-L_AOyy/postgresql-9.6-9.6.6=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o hex.o hex.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fdebug-prefix-map=/build/postgresql-9.6-L_AOyy/postgresql-9.6-9.6.6=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o inout.o inout.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fdebug-prefix-map=/build/postgresql-9.6-L_AOyy/postgresql-9.6-9.6.6=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o magic.o magic.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fdebug-prefix-map=/build/postgresql-9.6-L_AOyy/postgresql-9.6-9.6.6=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/9.6/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o misc.o misc.c

/usr/bin/python generate.py 9.6.6
make: /usr/bin/python: Command not found
Makefile:37: failed to perform the recipe for the target «operators.c»
make: *** [operators.c] Error 127

make install

/usr/bin/python generate.py 9.6.6
make: /usr/bin/python: Command not found
Makefile:37: failed to perform the recipe for the target «operators.c»
make: *** [operators.c] Error 127

segfault on insert

successfully installed proger10 fork on 9.6 (centos 7), registered (CREATE EXTENSION uint) and created public.uint8 field in table but whenever I try to insert record there pgsql crashes with segfault

Json operators treat pguint as strings...

create table crap (test integer);
CREATE TABLE
insert into crap values (456);
INSERT 0 1
select row_to_json(crap) as j from crap;
      j
--------------
 {"test":456}

But if instead I use...

create table crap2 (test uint4);
CREATE TABLE
insert into crap2 values (456);
INSERT 0 1
select row_to_json(crap2) as j from crap2;
       j
----------------
 {"test":"456"}

This is a minor nitpick of course. I was hoping that there's some clever create cast statement that will resolve the issue. Or would a solution need to be more involved than this?

Can't run "make"

There is an issue with your makefiles. I'm having the same problem with all your postgresql extensions. Perhaps the makefiles need to be updated. I try to manually give the makefile the path to my config.h in terminal, but I'm getting permission denied errors even when using sudo.

Problem Installation (Windows 10 x64) (sorry, new problem)

make

grep: 1': No such file or directory
grep: C:/OSPanel/modules/database/PostgreSQL-10.1-x64/include/server/pg_config.h: No such file or directory
makefile:29: C:/OSPanel/modules/database/PostgreSQL-10.1-x64/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target `C:/OSPanel/modules/database/PostgreSQL-10.1-x64/lib/pgxs/src/makefiles/pgxs.mk'. Stop.

make install

grep: 1': No such file or directory
grep: C:/OSPanel/modules/database/PostgreSQL-10.1-x64/include/server/pg_config.h: No such file or directory
makefile:29: C:/OSPanel/modules/database/PostgreSQL-10.1-x64/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory
make: *** No rule to make target `C:/OSPanel/modules/database/PostgreSQL-10.1-x64/lib/pgxs/src/makefiles/pgxs.mk'. Stop.

Has anyone figured out how to add this extension to a schema?

For example, if I do something like (in a database we will call mydb):

CREATE SCHEMA x;
CREATE EXTENSION uint WITH SCHEMA x;

SELECT (5::x.uint4=5::x.uint4);
ERROR:  operator is not unique: x.uint4 = x.uint4
LINE 1: select (5::x.uint4=5::x.uint4);
                          ^
HINT:  Could not choose a best candidate operator. You might need to add explicit type casts.

For some reason, the uint extension being installed in a schema seems to break the included comparison operators.

If I cast the uint4 to say bigint, I can compare once again, showing that it is fine with the x.uint4 type, it just doesn't know how to compare to uint4's using the comparison functions built into the extension:

select (5::x.uint4::bigint=5::x.uint4::bigint);
 ?column? 
----------
 t
(1 row)

I can bypass this by adding a search path:

ALTER DATABASE mydb SET search_path TO x;
-- Might need to reconnect for it to take effect
select (5::uint4=5::uint4);
 ?column? 
----------
 t
(1 row)

It can now find the equality operator in the search path (and the uint4 type in the x SCHEMA), but this is a total hack. I would imagine that the uint extension should prequalify comparators automatically with the SCHEMA to which it was installed (i.e., SCHEMA x in my example).

Problem Installation (Windows 10 x64)

make

process_begin: CreateProcess((null), pg_config --version, ...) failed.
process_begin: CreateProcess((null), pg_config --includedir-server, ...) failed.
"grep" is not internal or external
command, executable program or batch file.
process_begin: CreateProcess((null), pg_config --pgxs, ...) failed.
makefile:29: no file name for `include'
cat uint.sql hash.sql hex.sql operators.sql | sed 's/@UINT8_PASSEDBYVALUE@//' >uint--0.sql
"cat" is not internal or external
command, executable program or batch file.
make: *** [uint--0.sql] Error 255

make install

process_begin: CreateProcess((null), pg_config --version, ...) failed.
process_begin: CreateProcess((null), pg_config --includedir-server, ...) failed.
"grep" is not internal or external
command, executable program or batch file.
process_begin: CreateProcess((null), pg_config --pgxs, ...) failed.
makefile:29: no file name for include' make: *** No rule to make target install'. Stop.

Inverted error condition when adding or subtracting negative int4

When adding or subtracting a negative int4 to a uint4, the "integer out of range" error condition appears to be inverted.

Example:

postgres=# select 0::uint4 + (-1::int4);
  ?column?  
------------
 4294967295
(1 row)
postgres=# select 0::uint4 - (-1::int4);
ERROR:  integer out of range

Expected output:

postgres=# select 0::uint4 + (-1::int4);
ERROR:  integer out of range
postgres=# select 0::uint4 - (-1::int4);
 ?column? 
----------
        1
(1 row)

Creation failed in PG11

Hi, I have tried to install the extension in PG11 but I got plenty warnings and notes:
implicit declaration of function ‘GET_1_BYTE’ [-Wimplicit-function-declaration]
or
implicit declaration of function 'GET_1_BYTE' is invalid in C99 [-Wimplicit-function-declaration]

After "successful" compilation, linking, and installation the extension was not created, displaying the following error:
SQL Error [XX000]: ERROR: could not load library "/usr/lib/postgresql/11/lib/uint.so": /usr/lib/postgresql/11/lib/uint.so: undefined symbol: GET_1_BYTE

I tried to change the code in unit.h but I failed to make it run. With my little knowledge and recent "bad" experience I suspect it may not be only a matter of correct declaration but maybe beyond that.

Tia

PS: In PG10, the extension was created without any problem.

Install problem

Hi,

On my Debian 11 machine, make returns with this error :

make: generate.py: No such file or directory
make: *** [Makefile:33: operators.c] Error 127

I eventually managed to compile the extension, but I had to copy the file generate.py in my postgres install path, and I had to insert the following line at the top of it :

#!/usr/bin/python

New integer type

Hello.
Is it possible to add another type of integer MEDIUMINT (24 bit)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.