1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Implement remaining fields of information_schema.sequences view

Add new function pg_sequence_parameters that returns a sequence's start,
minimum, maximum, increment, and cycle values, and use that in the view.
(bug #5662; design suggestion by Tom Lane)

Also slightly adjust the view's column order and permissions after review of
SQL standard.
This commit is contained in:
Peter Eisentraut
2011-01-02 15:08:08 +02:00
parent e657b55e66
commit 39b8843296
8 changed files with 92 additions and 14 deletions

View File

@ -4139,31 +4139,42 @@ ORDER BY c.ordinal_position;
</row>
<row>
<entry><literal>maximum_value</literal></entry>
<entry><type>cardinal_number</type></entry>
<entry>Not yet implemented</entry>
<entry><literal>start_value</literal></entry>
<entry><type>character_data</type></entry>
<entry>The start value of the sequence</entry>
</row>
<row>
<entry><literal>minimum_value</literal></entry>
<entry><type>cardinal_number</type></entry>
<entry>Not yet implemented</entry>
<entry><type>character_data</type></entry>
<entry>The minimum value of the sequence</entry>
</row>
<row>
<entry><literal>maximum_value</literal></entry>
<entry><type>character_data</type></entry>
<entry>The maximum value of the sequence</entry>
</row>
<row>
<entry><literal>increment</literal></entry>
<entry><type>cardinal_number</type></entry>
<entry>Not yet implemented</entry>
<entry><type>character_data</type></entry>
<entry>The increment of the sequence</entry>
</row>
<row>
<entry><literal>cycle_option</literal></entry>
<entry><type>yes_or_no</type></entry>
<entry>Not yet implemented</entry>
<entry><literal>YES</literal> if the sequence cycles, else <literal>NO</literal></entry>
</row>
</tbody>
</tgroup>
</table>
<para>
Note that in accordance with the SQL standard, the start, minimum,
maximum, and increment values are returned as character strings.
</para>
</sect1>
<sect1 id="infoschema-sql-features">