-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not hardcode in OIDs from server headers #12
Comments
I discussed this issue on the PostgreSQL IRC channel. The issue, while true in theory, is not of a practical relevance here: "The server's headers have the correct oids for that version of the server. Fortunately, for the basic types like int/bool/char/text/numeric/timestamp_/float_ the oids have not changed in any pg version you'd want to support, also refcursor, regclass and regtype, void, unknown are probably safe to assume are stable. The danger is with types that were more recently adopted, which might show up on older versions as an extension type, e.g. before there was a builtin uuid type there were extensions for it, and possibly also for json. This is the exact list from a "conservative" list, i.e. stuff which can't be changed without breaking half the clients that already exist: boolean, character (bpchar), character varying (varchar), text, bytea, double precision (float8), real (float4), numeric, smallint, integer, bigint, date, timestamp, timestamp with time zone, time, time with time zone, interval, refcursor, regclass, regtype, void, unknown. The non-conservative list would be the list of #defines from catalog/pg_type.h from the oldest pg version you plan to support many clients assume that the oids for array types are fixed, for example." So I suggest to close this issue. |
In that case, could we move the OID defines into this project, so that the postgres server headers do not need to be installed to compile luapgsql? |
I ran into this issue pretty badly today; it looks like the debian packages have broken postgres_fe.h Can we move the OID defines into the project so we can drop the dependency on that header? |
How did you run into this issue? I am having no problems neither on squeeze, wheezy, nor on an Ubuntu variant. |
So I'm trying to run on a server running ubuntu precise (12.04).
These are the currently installed packages:
|
Under the Windows with PostgreSQL installed from binary package ( 2015-02-10 16:38 GMT+01:00 daurnimator notifications@github.com:
Karol Drożak |
It will be changed withing a few days. I will include the few OID Am 11.02.15 um 09:18 schrieb Karol Drozak:
|
How did discussion with postgres devs go? |
Did not discuss the issue at all. But I fixed it an rearranged the headers so that it compile without the server header files being installed. |
For conditionally compile should not be PG_VERSION_NUM instead 2015-02-13 10:52 GMT+01:00 Marc Balmer notifications@github.com:
Karol Drożak |
Am 13.02.15 um 12:05 schrieb Karol Drozak:
Of course! Thanks for letting me know. I fixed it on github. |
Take a look at luapgsql_win.patch, maybe you will be interested. 2015-02-13 13:08 GMT+01:00 Marc Balmer notifications@github.com:
Karol Drożak |
They can be changed per server.
They must be fetched per connection with
SELECT 'typename'::regtype::oid;
They may/should be cached (per connection)
This will be tricky to do non-blockingly.
The text was updated successfully, but these errors were encountered: