Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
a5f1d6c2
Commit
a5f1d6c2
authored
Feb 27, 2007
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow information schema definitions to work without requiring implicit
casts to text.
parent
ba339f79
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/backend/catalog/information_schema.sql
src/backend/catalog/information_schema.sql
+8
-8
No files found.
src/backend/catalog/information_schema.sql
View file @
a5f1d6c2
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*
*
* Copyright (c) 2003-2007, PostgreSQL Global Development Group
* Copyright (c) 2003-2007, PostgreSQL Global Development Group
*
*
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.4
1 2007/02/03 17:59:35
petere Exp $
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.4
2 2007/02/27 18:49:43
petere Exp $
*/
*/
/*
/*
...
@@ -412,7 +412,7 @@ CREATE VIEW check_constraints AS
...
@@ -412,7 +412,7 @@ CREATE VIEW check_constraints AS
SELECT
CAST
(
current_database
()
AS
sql_identifier
)
AS
constraint_catalog
,
SELECT
CAST
(
current_database
()
AS
sql_identifier
)
AS
constraint_catalog
,
CAST
(
n
.
nspname
AS
sql_identifier
)
AS
constraint_schema
,
CAST
(
n
.
nspname
AS
sql_identifier
)
AS
constraint_schema
,
CAST
(
n
.
oid
||
'_'
||
r
.
oid
||
'_'
||
a
.
attnum
||
'_not_null'
AS
sql_identifier
)
AS
constraint_name
,
-- XXX
CAST
(
CAST
(
n
.
oid
AS
text
)
||
'_'
||
CAST
(
r
.
oid
AS
text
)
||
'_'
||
CAST
(
a
.
attnum
AS
text
)
||
'_not_null'
AS
sql_identifier
)
AS
constraint_name
,
-- XXX
CAST
(
a
.
attname
||
' IS NOT NULL'
AS
character_data
)
CAST
(
a
.
attname
||
' IS NOT NULL'
AS
character_data
)
AS
check_clause
AS
check_clause
FROM
pg_namespace
n
,
pg_class
r
,
pg_attribute
a
FROM
pg_namespace
n
,
pg_class
r
,
pg_attribute
a
...
@@ -1735,7 +1735,7 @@ CREATE VIEW table_constraints AS
...
@@ -1735,7 +1735,7 @@ CREATE VIEW table_constraints AS
SELECT
CAST
(
current_database
()
AS
sql_identifier
)
AS
constraint_catalog
,
SELECT
CAST
(
current_database
()
AS
sql_identifier
)
AS
constraint_catalog
,
CAST
(
nr
.
nspname
AS
sql_identifier
)
AS
constraint_schema
,
CAST
(
nr
.
nspname
AS
sql_identifier
)
AS
constraint_schema
,
CAST
(
nr
.
oid
||
'_'
||
r
.
oid
||
'_'
||
a
.
attnum
||
'_not_null'
AS
sql_identifier
)
AS
constraint_name
,
-- XXX
CAST
(
CAST
(
nr
.
oid
AS
text
)
||
'_'
||
CAST
(
r
.
oid
AS
text
)
||
'_'
||
CAST
(
a
.
attnum
AS
text
)
||
'_not_null'
AS
sql_identifier
)
AS
constraint_name
,
-- XXX
CAST
(
current_database
()
AS
sql_identifier
)
AS
table_catalog
,
CAST
(
current_database
()
AS
sql_identifier
)
AS
table_catalog
,
CAST
(
nr
.
nspname
AS
sql_identifier
)
AS
table_schema
,
CAST
(
nr
.
nspname
AS
sql_identifier
)
AS
table_schema
,
CAST
(
r
.
relname
AS
sql_identifier
)
AS
table_name
,
CAST
(
r
.
relname
AS
sql_identifier
)
AS
table_name
,
...
@@ -2158,13 +2158,13 @@ CREATE VIEW views AS
...
@@ -2158,13 +2158,13 @@ CREATE VIEW views AS
CAST
(
'NONE'
AS
character_data
)
AS
check_option
,
CAST
(
'NONE'
AS
character_data
)
AS
check_option
,
CAST
(
CAST
(
CASE
WHEN
EXISTS
(
SELECT
1
FROM
pg_rewrite
WHERE
ev_class
=
c
.
oid
AND
ev_type
=
2
AND
is_instead
)
CASE
WHEN
EXISTS
(
SELECT
1
FROM
pg_rewrite
WHERE
ev_class
=
c
.
oid
AND
ev_type
=
'2'
AND
is_instead
)
AND
EXISTS
(
SELECT
1
FROM
pg_rewrite
WHERE
ev_class
=
c
.
oid
AND
ev_type
=
4
AND
is_instead
)
AND
EXISTS
(
SELECT
1
FROM
pg_rewrite
WHERE
ev_class
=
c
.
oid
AND
ev_type
=
'4'
AND
is_instead
)
THEN
'YES'
ELSE
'NO'
END
THEN
'YES'
ELSE
'NO'
END
AS
character_data
)
AS
is_updatable
,
AS
character_data
)
AS
is_updatable
,
CAST
(
CAST
(
CASE
WHEN
EXISTS
(
SELECT
1
FROM
pg_rewrite
WHERE
ev_class
=
c
.
oid
AND
ev_type
=
3
AND
is_instead
)
CASE
WHEN
EXISTS
(
SELECT
1
FROM
pg_rewrite
WHERE
ev_class
=
c
.
oid
AND
ev_type
=
'3'
AND
is_instead
)
THEN
'YES'
ELSE
'NO'
END
THEN
'YES'
ELSE
'NO'
END
AS
character_data
)
AS
is_insertable_into
AS
character_data
)
AS
is_insertable_into
...
@@ -2255,7 +2255,7 @@ CREATE VIEW element_types AS
...
@@ -2255,7 +2255,7 @@ CREATE VIEW element_types AS
CAST
(
null
AS
sql_identifier
)
AS
scope_name
,
CAST
(
null
AS
sql_identifier
)
AS
scope_name
,
CAST
(
null
AS
cardinal_number
)
AS
maximum_cardinality
,
CAST
(
null
AS
cardinal_number
)
AS
maximum_cardinality
,
CAST
(
'a'
||
x
.
objdtdid
AS
sql_identifier
)
AS
dtd_identifier
CAST
(
'a'
||
CAST
(
x
.
objdtdid
AS
text
)
AS
sql_identifier
)
AS
dtd_identifier
FROM
pg_namespace
n
,
pg_type
at
,
pg_namespace
nbt
,
pg_type
bt
,
FROM
pg_namespace
n
,
pg_type
at
,
pg_namespace
nbt
,
pg_type
bt
,
(
(
...
@@ -2299,7 +2299,7 @@ CREATE VIEW element_types AS
...
@@ -2299,7 +2299,7 @@ CREATE VIEW element_types AS
AND
at
.
typelem
=
bt
.
oid
AND
at
.
typelem
=
bt
.
oid
AND
nbt
.
oid
=
bt
.
typnamespace
AND
nbt
.
oid
=
bt
.
typnamespace
AND
(
n
.
nspname
,
x
.
objname
,
x
.
objtype
,
x
.
objdtdid
)
IN
AND
(
n
.
nspname
,
x
.
objname
,
x
.
objtype
,
CAST
(
x
.
objdtdid
AS
sql_identifier
)
)
IN
(
SELECT
object_schema
,
object_name
,
object_type
,
dtd_identifier
(
SELECT
object_schema
,
object_name
,
object_type
,
dtd_identifier
FROM
data_type_privileges
);
FROM
data_type_privileges
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment