Comments (10)
Sorry, not my best bug report ever :)
It was postgres 16.2 on debian (docker container) and PHP 8.3.
I found that the query from getTableColumnsSQL
is the issue:
SELECT a.attname AS "COLUMN_NAME", case when a.attnotnull then 'NO' else 'YES' end as "IS_NULLABLE", pg_catalog.format_type(a.atttypid, -1) as "DATA_TYPE", case when a.atttypmod < 0 then NULL else a.atttypmod-4 end as "CHARACTER_MAXIMUM_LENGTH", case when a.atttypid != 1700 then NULL else ((a.atttypmod - 4) >> 16) & 65535 end as "NUMERIC_PRECISION", case when a.atttypid != 1700 then NULL else (a.atttypmod - 4) & 65535 end as "NUMERIC_SCALE", '' AS "COLUMN_TYPE" FROM pg_attribute a JOIN pg_class pgc ON pgc.oid = a.attrelid WHERE pgc.relname = 'domains' AND '' <> 'domains' AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum;
This always returns data, even if you don't have a domains table (but when you do have that table this becomes an issue).
It did just ran the tests, they complete fine, but there is no domains table there :)
from php-crud-api.
Yes, latest master works, nice!
from php-crud-api.
Released in v2.14.26
from php-crud-api.
Thank you for reporting this issue.
It seems it pulls in column names that are internal to postgres domains.
Yes, please report the postgres version you are running. Please also report other relevant versions (OS, PHP, etc).
NB: Did you run the tests?
from php-crud-api.
but there is no domains table there :)
This domains thing is something new in PostgreSQL? Do you know what the pg_attribute
and pg_class
views look like causing this failure? Probably there is some internal table called domains, right?
from php-crud-api.
Can you test the latest master?
from php-crud-api.
Somehow the namespaces outside public where also evaluated. I restricted all reflection to the 'public' namespace, while I can imagine that people have other namespaces than public, so maybe it needs to be configurable.
from php-crud-api.
This shows the namespaces:
php-crud-api=# select distinct relnamespace::regnamespace::text from pg_class;
relnamespace
--------------------
public
pg_catalog
pg_toast
information_schema
(4 rows)
And the namespace that causes the problem:
php-crud-api=# select relnamespace::regnamespace::text from pg_class where relname = 'domains';
relnamespace
--------------------
information_schema
(1 row)
Maybe the excluding condition should be:
relnamespace::regnamespace::text !~ '^pg_|information_schema'
What do you think?
from php-crud-api.
Can you test the latest master?
from php-crud-api.
@tjikkun Dankjewel voor je bijdrage / Thank you for your contribution!
from php-crud-api.
Related Issues (20)
- Azure App Service HOT 1
- Add PHP backend to any app project with one command HOT 1
- Any advice on events integration? HOT 2
- Synchronization between local IndexedDB and MySQL Database. HOT 3
- Can the API Support Customized Cache Management for Specific Tables? HOT 9
- Question: Add property on create HOT 3
- Insights on caching with Redis HOT 2
- Using Customization handler to insert app-generated ID HOT 11
- PUT using curl comes back successful but the record is not actually updated HOT 2
- Suggestion to modify response JSON root Key (records) HOT 2
- firebase jwt public key rotation HOT 5
- "Route '' not found" HOT 3
- Additional SQL queries in authorization handlers HOT 2
- Direct usage of PHP CRUD API functions in external PHP Files HOT 8
- Returning user uploaded file using custom controller HOT 2
- Found this PDOException occurred (enable debug mode) in message HOT 6
- Route Not Found Error Upon Deployment to Online Server HOT 4
- Authentication to see documentation HOT 2
- Error code :1000, message : Route not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-crud-api.