I have this query:
select * from topics
order by case when id=1 then 0 else 1 end, bumped_at desc
limit 30
It works fine, bumps id 1 to the front of the sort fine but is
terribly inefficient and scans
OTH
"select * from topics where id = 1" is super fast
"select * from topics order by bumped_a
William Gordon Rutherdale wrote
> I have encountered a problem with references when using INHERITS (on
> Postgres 9.1/9.2). Could someone please explain why this occurs.
>
> My problem: could someone please explain the semantics and why this
> behaviour makes sense -- or is it a design error or
Hi.
I have encountered a problem with references when using INHERITS (on
Postgres 9.1/9.2). Could someone please explain why this occurs.
Consider this example.
CREATE TABLE primate
(
id SERIAL PRIMARY KEY,
name TEXT,
tale TEXT
);
CREATE TABLE chimp
(
human_friend TEXT
) INHERITS