Is there a knowable order in which functions are called within a query in
PostgreSQL?
For example I'll use the Oracle contains function, though this is not
exactly what I'm doing, it just illustrates the issue clearly.
select *, score(1) from mytable where contains(mytable.title, 'Winding
Road',
[EMAIL PROTECTED] writes:
For example I'll use the Oracle contains function, though this is not
exactly what I'm doing, it just illustrates the issue clearly.
select *, score(1) from mytable where contains(mytable.title, 'Winding
Road', 1) order by score(1);
The contains function does a
[EMAIL PROTECTED] wrote:
Would it be something like: where clause first, left to right, followed
by select terms, left to right, and lastly the order by clause?
I don't know what ANSI says, nor do I know what PostgreSQL exactly does
at the moment, but, the only thing you can reasonably count on
[EMAIL PROTECTED] writes:
For example I'll use the Oracle contains function, though this is not
exactly what I'm doing, it just illustrates the issue clearly.
select *, score(1) from mytable where contains(mytable.title, 'Winding
Road', 1) order by score(1);
The contains function does a
I was kind of afraid of that. So, how could one implement such a function
set?
Write a function (say, score_contains) that returns NULL whenever
contains would return false, and the score otherwise.
SELECT * FROM (
SELECT *, score_contains(mytable.title, 'Winding Road', 1) AS
score FROM
[EMAIL PROTECTED] writes:
For example I'll use the Oracle contains function, though this is not
exactly what I'm doing, it just illustrates the issue clearly.
select *, score(1) from mytable where contains(mytable.title, 'Winding
Road', 1) order by score(1);
The contains function does a
[EMAIL PROTECTED] writes:
I need to perform an operation during query time and there are multiple
results based on the outcome. For instance: (Lets try this)
select myrank(t1.column1, t2.column2, 1) as rank,
myscore(t1.column1,t2.column2, 1) as score from t1, t2 where
I was kind of afraid of that. So, how could one implement such a
function
set?
Write a function (say, score_contains) that returns NULL whenever
contains would return false, and the score otherwise.
SELECT * FROM (
SELECT *, score_contains(mytable.title, 'Winding Road', 1) AS
score
[EMAIL PROTECTED] writes:
I need to perform an operation during query time and there are multiple
results based on the outcome. For instance: (Lets try this)
select myrank(t1.column1, t2.column2, 1) as rank,
myscore(t1.column1,t2.column2, 1) as score from t1, t2 where