Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit828822b

Browse files
committed
Add remaining documentation tables to information schema.
1 parentcde9f85 commit828822b

File tree

3 files changed

+114
-7
lines changed

3 files changed

+114
-7
lines changed

‎src/backend/catalog/information_schema.sql

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright 2002, PostgreSQL Global Development Group
66
*
7-
* $Id: information_schema.sql,v 1.2 2003/01/14 23:19:34 petere Exp $
7+
* $Id: information_schema.sql,v 1.3 2003/01/15 23:37:27 petere Exp $
88
*/
99

1010

@@ -322,6 +322,38 @@ CREATE TABLE sql_features (
322322
GRANTSELECTON sql_features TO PUBLIC;
323323

324324

325+
/*
326+
* 20.48
327+
* SQL_IMPLEMENTATION_INFO table
328+
*/
329+
330+
-- Note: Implementation information items are defined in ISO 9075-3:1999,
331+
-- clause 7.1.
332+
333+
CREATETABLEsql_implementation_info (
334+
implementation_info_id character_data,
335+
implementation_info_name character_data,
336+
integer_value cardinal_number,
337+
character_value character_data,
338+
comments character_data
339+
) WITHOUT OIDS;
340+
341+
INSERT INTO sql_implementation_infoVALUES ('10003','CATALOG NAME',NULL,'Y',NULL);
342+
INSERT INTO sql_implementation_infoVALUES ('10004','COLLATING SEQUENCE',NULL,'','not supported');
343+
INSERT INTO sql_implementation_infoVALUES ('23','CURSOR COMMIT BEHAVIOR',1,NULL,'close cursors and retain prepared statements');
344+
INSERT INTO sql_implementation_infoVALUES ('2','DATA SOURCE NAME',NULL,'',NULL);
345+
INSERT INTO sql_implementation_infoVALUES ('17','DBMS NAME',NULL, (selecttrim(trailing''fromsubstring(version()from'^[^0-9]*'))),NULL);
346+
INSERT INTO sql_implementation_infoVALUES ('18','DBMS VERSION',NULL,'???',NULL);-- filled by initdb
347+
INSERT INTO sql_implementation_infoVALUES ('26','DEFAULT TRANSACTION ISOLATION',2,NULL,'READ COMMITED; user-settable');
348+
INSERT INTO sql_implementation_infoVALUES ('28','IDENTIFIER CASE',3,NULL,'stored in mixed case - case sensitive');
349+
INSERT INTO sql_implementation_infoVALUES ('85','NULL COLLATION',0,NULL,'nulls higher than non-nulls');
350+
INSERT INTO sql_implementation_infoVALUES ('13','SERVER NAME',NULL,'',NULL);
351+
INSERT INTO sql_implementation_infoVALUES ('94','SPECIAL CHARACTERS',NULL,'','all non-ASCII characters allowed');
352+
INSERT INTO sql_implementation_infoVALUES ('46','TRANSACTION CAPABLE',2,NULL,'both DML and DDL');
353+
354+
GRANTSELECTON sql_implementation_info TO PUBLIC;
355+
356+
325357
/*
326358
* 20.49
327359
* SQL_LANGUAGES table
@@ -370,6 +402,72 @@ INSERT INTO sql_packages VALUES ('PKG009', 'SQL/MM support', 'NO', NULL, '');
370402
GRANTSELECTON sql_packages TO PUBLIC;
371403

372404

405+
/*
406+
* 20.51
407+
* SQL_SIZING table
408+
*/
409+
410+
-- Note: Sizing items are defined in ISO 9075-3:1999, clause 7.2.
411+
412+
CREATETABLEsql_sizing (
413+
sizing_id cardinal_number,
414+
sizing_name character_data,
415+
supported_value cardinal_number,
416+
comments character_data
417+
) WITHOUT OIDS;
418+
419+
INSERT INTO sql_sizingVALUES (34,'MAXIMUM CATALOG NAME LENGTH',63,NULL);
420+
INSERT INTO sql_sizingVALUES (30,'MAXIMUM COLUMN NAME LENGTH',63,NULL);
421+
INSERT INTO sql_sizingVALUES (97,'MAXIMUM COLUMNS IN GROUP BY',0,NULL);
422+
INSERT INTO sql_sizingVALUES (99,'MAXIMUM COLUMNS IN ORDER BY',0,NULL);
423+
INSERT INTO sql_sizingVALUES (100,'MAXIMUM COLUMNS IN SELECT',0,NULL);
424+
INSERT INTO sql_sizingVALUES (101,'MAXIMUM COLUMNS IN TABLE',1600,NULL);-- match MaxHeapAttributeNumber
425+
INSERT INTO sql_sizingVALUES (1,'MAXIMUM CONCURRENT ACTIVITIES',0,NULL);
426+
INSERT INTO sql_sizingVALUES (31,'MAXIMUM CURSOR NAME LENGTH',63,NULL);
427+
INSERT INTO sql_sizingVALUES (0,'MAXIMUM DRIVER CONNECTIONS',NULL,NULL);
428+
INSERT INTO sql_sizingVALUES (10005,'MAXIMUM IDENTIFIER LENGTH',63,NULL);
429+
INSERT INTO sql_sizingVALUES (32,'MAXIMUM SCHEMA NAME LENGTH',63,NULL);
430+
INSERT INTO sql_sizingVALUES (20000,'MAXIMUM STATEMENT OCTETS',0,NULL);
431+
INSERT INTO sql_sizingVALUES (20001,'MAXIMUM STATEMENT OCTETS DATA',0,NULL);
432+
INSERT INTO sql_sizingVALUES (20002,'MAXIMUM STATEMENT OCTETS SCHEMA',0,NULL);
433+
INSERT INTO sql_sizingVALUES (35,'MAXIMUM TABLE NAME LENGTH',63,NULL);
434+
INSERT INTO sql_sizingVALUES (106,'MAXIMUM TABLES IN SELECT',0,NULL);
435+
INSERT INTO sql_sizingVALUES (107,'MAXIMUM USER NAME LENGTH',63,NULL);
436+
INSERT INTO sql_sizingVALUES (25000,'MAXIMUM CURRENT DEFAULT TRANSFORM GROUP LENGTH',NULL,NULL);
437+
INSERT INTO sql_sizingVALUES (25001,'MAXIMUM CURRENT TRANSFORM GROUP LENGTH',NULL,NULL);
438+
INSERT INTO sql_sizingVALUES (25002,'MAXIMUM CURRENT PATH LENGTH',0,NULL);
439+
INSERT INTO sql_sizingVALUES (25003,'MAXIMUM CURRENT ROLE LENGTH',NULL,NULL);
440+
INSERT INTO sql_sizingVALUES (25004,'MAXIMUM SESSION USER LENGTH',63,NULL);
441+
INSERT INTO sql_sizingVALUES (25005,'MAXIMUM SYSTEM USER LENGTH',63,NULL);
442+
443+
UPDATE sql_sizing
444+
SET supported_value= (SELECT typlen-1FROMpg_catalog.pg_typeWHERE typname='name'),
445+
comments='Might be less, depending on character set.'
446+
WHERE supported_value=63;
447+
448+
GRANTSELECTON sql_sizing TO PUBLIC;
449+
450+
451+
/*
452+
* 20.52
453+
* SQL_SIZING_PROFILES table
454+
*/
455+
456+
-- The data in this table are defined by various profiles of SQL.
457+
-- Since we don't have any information about such profiles, we provide
458+
-- an empty table.
459+
460+
CREATETABLEsql_sizing_profiles (
461+
sizing_id cardinal_number,
462+
sizing_name character_data,
463+
profile_id character_data,
464+
required_value cardinal_number,
465+
comments character_data
466+
) WITHOUT OIDS;
467+
468+
GRANTSELECTON sql_sizing_profiles TO PUBLIC;
469+
470+
373471
/*
374472
* 20.53
375473
* TABLE_CONSTRAINTS view

‎src/backend/catalog/sql_features.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ F461Named character setsNO
227227
F471Scalar subquery valuesYES
228228
F481Expanded NULL predicateYES
229229
F491Constraint managementYES
230-
F501Features and conformance viewsNO
230+
F501Features and conformance viewsYES
231231
F501Features and conformance views01SQL_FEATURES viewYES
232-
F501Features and conformance views02SQL_SIZING viewNO
232+
F501Features and conformance views02SQL_SIZING viewYES
233233
F501Features and conformance views03SQL_LANGUAGES viewYES
234-
F502Enhanced documentation tablesNO
235-
F502Enhanced documentation tables01SQL_SIZING_PROFILES viewNO
236-
F502Enhanced documentation tables02SQL_IMPLEMENTATION_INFO viewNO
234+
F502Enhanced documentation tablesYES
235+
F502Enhanced documentation tables01SQL_SIZING_PROFILES viewYES
236+
F502Enhanced documentation tables02SQL_IMPLEMENTATION_INFO viewYES
237237
F502Enhanced documentation tables03SQL_PACKAGES viewYES
238238
F511BIT data typeYES
239239
F521AssertionsNO

‎src/bin/initdb/initdb.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
2828
# Portions Copyright (c) 1994, Regents of the University of California
2929
#
30-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.179 2003/01/14 23:19:34 petere Exp $
30+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.180 2003/01/15 23:37:28 petere Exp $
3131
#
3232
#-------------------------------------------------------------------------
3333

@@ -1045,6 +1045,15 @@ echo "ok"
10451045
$ECHO_N"creating information schema..."$ECHO_C
10461046
"$PGPATH"/postgres$PGSQL_OPT -N template1> /dev/null<"$datadir"/information_schema.sql|| exit_nicely
10471047
(
1048+
# Format version number to format required by information schema (09.08.0007abc).
1049+
major_version=`echo$VERSION| sed's/^\([0-9]*\).*/00\1/;s/.*\(..\)$/\1/'`
1050+
minor_version=`echo$VERSION| sed's/^[0-9]*\.\([0-9]*\).*/00\1/;s/.*\(..\)$/\1/'`
1051+
micro_version=`echo$VERSION| sed's/^[0-9]*\.[0-9]*\.\([0-9]*\).*/0000\1/;t L;s/.*/0000/;q;: L;s/.*\(....\)$/\1/'`
1052+
letter_version=`echo$VERSION| sed's/^.*[0-9]\([^0-9]*\)$/\1/'`
1053+
combined_version="$major_version.$minor_version.$micro_version$letter_version"
1054+
1055+
echo"UPDATE information_schema.sql_implementation_info SET character_value = '$combined_version' WHERE implementation_info_name = 'DBMS VERSION';"
1056+
10481057
echo"COPY information_schema.sql_features (feature_id, feature_name, sub_feature_id, sub_feature_name, is_supported, comments) FROM STDIN;"
10491058
cat"$datadir"/sql_features.txt
10501059
echo"\."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp