Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
627 Lượt xem

I was trying to check which company a User is in and the list of companies so I access the backend postgres. But when I tried to use 

SELECT * FROM res_company;

It was empty. I wonder why, because in the res_users table, the company_id field has values. However, when I tried

SELECT id, name FROM res_company;

it showed the list of companies.


Why is that?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

When you ran SELECT * FROM res_company; and saw no output, it’s not because the table is empty — it's due to how your SQL client handles certain data types. The res_company table contains fields like binary (e.g., logos) or large text/JSON, which some clients struggle to render or may suppress by default, making it appear as if there’s no data.

However, when you ran SELECT id, name FROM res_company;, you specifically requested simple, non-complex fields, which are easily displayed — confirming that the data is indeed present.

In short, the difference is due to client-side rendering limitations, not an issue with the data itself.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 12 20
5185
1
thg 7 24
1395
2
thg 3 15
5885
1
thg 7 25
542
0
thg 7 25
1492