Hi, Keith,

On Tue, Jun 5, 2018 at 5:09 PM, Keith Medcalf <kmedc...@dessus.com> wrote:
>
> Most of them.  In particular those that return (as in SELECT) data work 
> either way.  Those that set things can only be used as a pragma.
>
> Note that the table name is passed differently (in the case of pragma's 
> expecting an identifier).
> It is an identifier in the case of a pragma statement, and a string in the 
> case of the table valued function.
>
> pragma foreign_key_list(identifier);
> select * from pragma_foreign_key_list(stringval);
>
> ie:
>
> pragma foreign_key_list("My Table");
> select * from foreign_key_list('My Table');
>
> or, if you do not have stoopid characters in identifiers:
>
> pragma foreign_key_list(MyTable);
> select * from foreign_key_list('MyTable');
>
>
> Both versions behave identically and reset/auto-reset properly for me ...

Here is the session with the SQLite version I'm currently developing:

[code]
SQLite version 3.13.0 2016-05-18 10:57:30
Enter ".help" for usage hints.
sqlite> SELECT* FROM leagues;
1|Demo - Roto (Auction)|1|1|1|demo|260|0
2|Demo - Roto (Draft)|3|1|1|demo|260|0
3|Demo - Points (Auction)|1|2|1|demo|260|0
4|Demo - Points (Draft)|3|2|1|demo|260|0
sqlite> SELECT * FROM pragma_foreign_key_list(leagues);
Error: no such table: pragma_foreign_key_list
sqlite>
[/code]

This version is a little behind (I believe something like 4 years old).
Now, since I'm still developing I can upgrade that version, but when I
went to the SQLite
download page I see the SQLite 3.24 version and I don't remember the
official release
announcement being sent out by Mr. Hipp.
Is today sources/shell tool is the released version and I just missed
the announcement?

Thank you.

>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
> lot about anticipated traffic volume.
>
>
>>-----Original Message-----
>>From: sqlite-users [mailto:sqlite-users-
>>boun...@mailinglists.sqlite.org] On Behalf Of Olivier Mascia
>>Sent: Tuesday, 5 June, 2018 15:35
>>To: SQLite mailing list
>>Subject: Re: [sqlite] Reset the cursor
>>
>>> Le 5 juin 2018 à 22:47, Igor Korot <ikoro...@gmail.com> a écrit :
>>>
>>> As a side note: is it the case for all PRAGMA's command - they can
>>be
>>> rewritten this way?
>>
>>Full documentation for that is on page
>>https://www.sqlite.org/pragma.html, see the second title ("PRAGMA
>>functions").
>>
>>Citing in short: // PRAGMAs that return results and that have no
>>side-effects can be accessed from ordinary SELECT statements as
>>table-valued functions. For each participating PRAGMA, the
>>corresponding table-valued function has the same name as the PRAGMA
>>with a 7-character "pragma_" prefix. //
>>
>>--
>>Best Regards, Meilleures salutations, Met vriendelijke groeten,
>>Olivier Mascia
>>
>>
>>_______________________________________________
>>sqlite-users mailing list
>>sqlite-users@mailinglists.sqlite.org
>>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to