1 ginarrayextract() has 2 parameters
2 gin_extract_tsquery() has 3 parameters
3 run sql(from plsql/src/test/regress/sql/opr_sanity.sql), it expect no 
results:
-------------
SELECT p1.amopclaid, p1.amprocnum,
 p2.oid, p2.proname,
 p3.opcname,
 p4.amopclaid, p4.amprocnum,
 p5.oid, p5.proname,
 p6.opcname
FROM pg_amproc AS p1, pg_proc AS p2, pg_opclass AS p3,
     pg_amproc AS p4, pg_proc AS p5, pg_opclass AS p6
WHERE p1.amopclaid = p3.oid AND p4.amopclaid = p6.oid AND
    p3.opcamid = p6.opcamid AND p1.amprocnum = p4.amprocnum AND
    p1.amproc = p2.oid AND p4.amproc = p5.oid AND
    (p2.proretset OR p5.proretset OR p2.pronargs != p5.pronargs);
--------------
We can get results as follow:
 amopclaid | amprocnum | oid  |       proname       |     opcname      | 
amopclaid | amprocnum | oid  |       proname       |     opcname
-----------+-----------+------+---------------------+------------------+-----------+-----------+------+---------------------+------------------
      2771 |         3 | 2743 | ginarrayextract     | _oidvector_ops   | 
3659 |         3 | 3657 | gin_extract_tsquery | tsvector_ops
      2759 |         3 | 2743 | ginarrayextract     | _cidr_ops        | 
3659 |         3 | 3657 | gin_extract_tsquery | tsvector_ops
      2768 |         3 | 2743 | ginarrayextract     | _name_ops        | 
3659 |         3 | 3657 | gin_extract_tsquery | tsvector_ops
......
4 But, reading "plsql/src/test/regress/sql/opr_sanity.sql", there is a 
sentence said:
" We can check that all the referenced instances of the same support routine 
number take the same number of parameters" ?

5 So, ginarrayextract() and gin_extract_tsquery() should take the same 
number of parameters?
Or, " We can check that all the referenced instances of the same support 
routine number take the same number of parameters" is not a right?

6 Actually, pgsql allow all the referenced instances of the same support 
routine number do not take the same number of parameters.

Thanks.
Fly.Li



"Tom Lane" <t...@sss.pgh.pa.us> дÈëÓʼþÐÂÎÅ:<10550.1246457...@sss.pgh.pa.us>...
> "Fly.Li" <fly...@126.com> writes:
> > version: PG8.2.2
> > MY Question:
> > Why must "take the same number of parameters" ?
>
> Because the GIN code will call it with a particular number of arguments.
>
> > When I use tsearch2, I found that gin_extract_tsquery() has 3 
> > parameters, it
> > break the rule "take the same number of parameters".
>
> 3 is the correct number of parameters for an extractQuery function
> (before 8.4 anyway), so I'm not clear what you are complaining about.
>
>    regards, tom lane
>
> -- 
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
> 


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to