Module dependency on PostgeSQL version
От | Thomas Hallgren |
---|---|
Тема | Module dependency on PostgeSQL version |
Дата | |
Msg-id | c7r86n$2c9a$1@news.hub.org обсуждение исходный текст |
Ответы |
Re: Module dependency on PostgeSQL version
Re: Module dependency on PostgeSQL version |
Список | pgsql-hackers |
I'd like to make a small suggestion that would enable external modules to manage dependencies to PostgreSQL versions. Consider the following code: #if PGSQL_MAJOR_VER > 7 || (PGSQL_MAJOR_VER == 7 && PGSQL_MINOR_VER > 4) result = HeapTupleGetDatum(tuple); #else /* PostgreSQL 7.4 or earlier */ TupleTableSlot* slot = TupleDescGetSlot(tupleDesc); result = TupleGetDatum(slot,tuple); #endif The PGSQL_MAJOR_VER and PGSQL_MINOR_VER does not exist today. Ideally, I'd like to find them in src/Makefile.global. Only thing present seems to be the VERSION. I'd like to see something like: PGSQL_MAJOR_VER := 7 PGSQL_MINOR_VER := 5 PGSQL_PATCH_VER := devel VERSION := $(PGSQL_MAJOR_VER).$(PGSQL_MINOR_VER).$(PGSQL_PATCH_VER) To be used in CPPFLAGS as: -DPGSQL_MAJOR_VER=$(PGSQL_MAJOR_VER) etc. The alternative for me (and others who undoubtedly will encounter the same problem) is to invent something ugly to split the current VERSION variable. Considering ease of extension of PostgreSQL, I wanted to suggest this first. Kind regards, Thomas Hallgren
В списке pgsql-hackers по дате отправления: