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

Commit219652d

Browse files
Jan WieckJan Wieck
Jan Wieck
authored and
Jan Wieck
committed
Okay, this is how it looks: Please apply the attached patch to the current
sources, otherwise this whole things fails anyway (fails to create theviews).Peter EisentrautManually applied - Jan
1 parent97710d9 commit219652d

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

‎src/bin/initdb/initdb.sh

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
#
2828
# IDENTIFICATION
29-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.68 1999/12/1703:46:33 momjian Exp $
29+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.69 1999/12/1716:53:11 wieck Exp $
3030
#
3131
#-------------------------------------------------------------------------
3232

@@ -438,71 +438,71 @@ echo "COPY pg_shadow TO '$PGDATA/pg_pwd' USING DELIMITERS '\\t'" \
438438
chmod go-rw$PGDATA/pg_pwd|| exit_nicely
439439

440440
echo"Creating view pg_user."
441-
echo"CREATE VIEW pg_user AS
442-
SELECT
443-
usename,
444-
usesysid,
445-
usecreatedb,
446-
usetrace,
447-
usesuper,
448-
usecatupd,
449-
'********'::text as passwd,
450-
valuntil
441+
echo"CREATE VIEW pg_user AS\
442+
SELECT\
443+
usename,\
444+
usesysid,\
445+
usecreatedb,\
446+
usetrace,\
447+
usesuper,\
448+
usecatupd,\
449+
'********'::text as passwd,\
450+
valuntil\
451451
FROM pg_shadow" \
452452
|$PGPATH/postgres$PGSQL_OPT template1> /dev/null|| exit_nicely
453453

454454
echo"REVOKE ALL on pg_shadow FROM public" \
455455
|$PGPATH/postgres$PGSQL_OPT template1> /dev/null|| exit_nicely
456456

457457
echo"Creating view pg_rules."
458-
echo"CREATE VIEW pg_rules AS
459-
SELECT
460-
C.relname AS tablename,
461-
R.rulename AS rulename,
462-
pg_get_ruledef(R.rulename) AS definition
463-
FROM pg_rewrite R, pg_class C
464-
WHERE R.rulename !~ '^_RET'
458+
echo"CREATE VIEW pg_rules AS\
459+
SELECT\
460+
C.relname AS tablename,\
461+
R.rulename AS rulename,\
462+
pg_get_ruledef(R.rulename) AS definition\
463+
FROM pg_rewrite R, pg_class C\
464+
WHERE R.rulename !~ '^_RET'\
465465
AND C.oid = R.ev_class;" \
466466
|$PGPATH/postgres$PGSQL_OPT template1> /dev/null|| exit_nicely
467467

468468
echo"Creating view pg_views."
469-
echo"CREATE VIEW pg_views AS
470-
SELECT
471-
C.relname AS viewname,
472-
pg_get_userbyid(C.relowner) AS viewowner,
473-
pg_get_viewdef(C.relname) AS definition
474-
FROM pg_class C
475-
WHERE C.relhasrules
476-
ANDEXISTS (
477-
SELECT rulename FROM pg_rewrite R
478-
WHERE ev_class = C.oid AND ev_type = '1'
469+
echo"CREATE VIEW pg_views AS\
470+
SELECT\
471+
C.relname AS viewname,\
472+
pg_get_userbyid(C.relowner) AS viewowner,\
473+
pg_get_viewdef(C.relname) AS definition\
474+
FROM pg_class C\
475+
WHERE C.relhasrules\
476+
ANDEXISTS (\
477+
SELECT rulename FROM pg_rewrite R\
478+
WHERE ev_class = C.oid AND ev_type = '1'\
479479
)" \
480480
|$PGPATH/postgres$PGSQL_OPT template1> /dev/null|| exit_nicely
481481

482482
echo"Creating view pg_tables."
483-
echo"CREATE VIEW pg_tables AS
484-
SELECT
485-
C.relname AS tablename,
486-
pg_get_userbyid(C.relowner) AS tableowner,
487-
C.relhasindex AS hasindexes,
488-
C.relhasrules AS hasrules,
489-
(C.reltriggers > 0) AS hastriggers
490-
FROM pg_class C
491-
WHERE C.relkind IN ('r', 's')
492-
AND NOT EXISTS (
493-
SELECT rulename FROM pg_rewrite
494-
WHERE ev_class = C.oid AND ev_type = '1'
483+
echo"CREATE VIEW pg_tables AS\
484+
SELECT\
485+
C.relname AS tablename,\
486+
pg_get_userbyid(C.relowner) AS tableowner,\
487+
C.relhasindex AS hasindexes,\
488+
C.relhasrules AS hasrules,\
489+
(C.reltriggers > 0) AS hastriggers\
490+
FROM pg_class C\
491+
WHERE C.relkind IN ('r', 's')\
492+
AND NOT EXISTS (\
493+
SELECT rulename FROM pg_rewrite\
494+
WHERE ev_class = C.oid AND ev_type = '1'\
495495
)" \
496496
|$PGPATH/postgres$PGSQL_OPT template1> /dev/null|| exit_nicely
497497

498498
echo"Creating view pg_indexes."
499-
echo"CREATE VIEW pg_indexes AS
500-
SELECT
501-
C.relname AS tablename,
502-
I.relname AS indexname,
503-
pg_get_indexdef(X.indexrelid) AS indexdef
504-
FROM pg_index X, pg_class C, pg_class I
505-
WHERE C.oid = X.indrelid
499+
echo"CREATE VIEW pg_indexes AS\
500+
SELECT\
501+
C.relname AS tablename,\
502+
I.relname AS indexname,\
503+
pg_get_indexdef(X.indexrelid) AS indexdef\
504+
FROM pg_index X, pg_class C, pg_class I\
505+
WHERE C.oid = X.indrelid\
506506
AND I.oid = X.indexrelid" \
507507
|$PGPATH/postgres$PGSQL_OPT template1> /dev/null|| exit_nicely
508508

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp