how to get argument number

how to get argument number

Post by 帅猛 » Mon, 02 Dec 2002 01:08:32



  I create a funtion with C ,i want to know how many argument number i have=
 got;
which macro i can use?,PG_GETARGV_INT16 or other macro ? thanks!
=20=09=09=09=09

=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1

=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A12002-12-01

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

 
 
 

how to get argument number

Post by Tom La » Mon, 02 Dec 2002 01:24:10



>   I create a funtion with C ,i want to know how many argument number i have got;
> which macro i can use?,PG_GETARGV_INT16 or other macro ? thanks!

PG_NARGS()

Of course, this will only be useful if you make multiple pg_proc entries
pointing at the same C function.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

 
 
 

1. SP with unknown number of arguments or one delimited argument

Hi group,

SQL 2000:  Can anyone tell me how to create a stored procedure that will
either accept an unknown number of arguments or that can accept a comma
separated argument interpreted as just a single argument so that I can use
an IN in my WHERE clause?  Example:



I'd like to have this procedure so that I can pass a value like this to it:

EXEC sp_Something 1,2,3

I've tried passing (1,2,3) and '1,2,3', and neither of them works:

The (1,2,3) creates a syntax error.
The '1,2,3' treats the value as a text value, of course.

I've tried delimiting my 1,2,3 with ", |, {}, [], and everything else I can
think of.

Thanks a lot,

Ray at home

2. how to automate backups with SQL 7.0??

3. Getting a total hit number and a LIMIT number at the same time

4. Oracle Resources (JOBS, RESUMES, LINKS, TUNING SCRIPT)!

5. Why am I getting a ByRef argument type mismatch error

6. newbie connection problems

7. sp_MSaddinitialarticle has too many arguments specified when getting snapshot in merge

8. OLE DB connection

9. getting a count of arguments

10. Getting a Compile Error: ByRef argument type mismatch

11. Stored procedure with variable number of arguments

12. Variable number of arguments to a stored procedure

13. PLS-00306: wrong number or types of arguments