comparison db_schema/stammdaten_schema.sql @ 873:ad64ef3379a8

Remove unused VIEWs.
author Tom Gottfried <tom@intevation.de>
date Tue, 09 Feb 2016 15:11:36 +0100
parents e161d8f2d978
children 6bd149c352a9
comparison
equal deleted inserted replaced
872:e161d8f2d978 873:ad64ef3379a8
599 599
600 ALTER SEQUENCE result_id_seq OWNED BY result.id; 600 ALTER SEQUENCE result_id_seq OWNED BY result.id;
601 601
602 602
603 603
604 CREATE VIEW s_00_view AS
605 SELECT deskriptoren.s_xx AS s00,
606 deskriptoren.bedeutung,
607 deskriptoren.beschreibung,
608 deskriptoren.sn
609 FROM deskriptoren
610 WHERE (deskriptoren.ebene = 0);
611
612
613
614 CREATE VIEW s_01_view AS
615 SELECT d1.s_xx AS s01,
616 d2.s_xx AS s00,
617 d1.bedeutung,
618 d1.beschreibung,
619 d1.sn
620 FROM (deskriptoren d1
621 JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id)))
622 WHERE (d1.ebene = 1);
623
624
625
626 CREATE VIEW s_02_s_01_view AS
627 SELECT d1.s_xx AS s01,
628 d2.s_xx AS s02
629 FROM (deskriptoren d1
630 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
631 WHERE (d2.ebene = 2);
632
633
634
635 CREATE VIEW s_02_view AS
636 SELECT DISTINCT deskriptoren.s_xx AS s00,
637 deskriptoren.bedeutung,
638 deskriptoren.beschreibung,
639 deskriptoren.sn
640 FROM deskriptoren
641 WHERE (deskriptoren.ebene = 2);
642
643
644
645 CREATE VIEW s_03_s_01_view AS
646 SELECT d1.s_xx AS s01,
647 d2.s_xx AS s03
648 FROM (deskriptoren d1
649 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
650 WHERE ((d2.ebene = 3) AND (d1.ebene = 1));
651
652
653
654 CREATE VIEW s_03_view AS
655 SELECT d1.s_xx AS s03,
656 d2.s_xx AS s02,
657 d1.bedeutung,
658 d1.beschreibung,
659 d1.sn
660 FROM (deskriptoren d1
661 JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id)))
662 WHERE ((d1.ebene = 3) AND (d2.ebene = 2))
663 UNION
664 SELECT d1.s_xx AS s03,
665 NULL::integer AS s02,
666 d1.bedeutung,
667 d1.beschreibung,
668 d1.sn
669 FROM (deskriptoren d1
670 JOIN deskriptoren d2 ON ((d1.vorgaenger = d2.id)))
671 WHERE ((d1.ebene = 3) AND (d2.ebene = 1));
672
673
674
675 CREATE VIEW s_04_s_01_view AS
676 SELECT DISTINCT d1.s_xx AS s01,
677 d2.s_xx AS s04
678 FROM (deskriptoren d1
679 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
680 WHERE (d2.ebene = 4);
681
682
683
684 CREATE VIEW s_04_view AS
685 SELECT DISTINCT deskriptoren.s_xx AS s04,
686 deskriptoren.bedeutung,
687 deskriptoren.beschreibung,
688 deskriptoren.sn
689 FROM deskriptoren
690 WHERE (deskriptoren.ebene = 4);
691
692
693
694 CREATE VIEW s_05_s_01_view AS
695 SELECT d1.s_xx AS s01,
696 d2.s_xx AS s05
697 FROM (deskriptoren d1
698 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
699 WHERE (d2.ebene = 5);
700
701
702
703 CREATE VIEW s_05_view AS
704 SELECT DISTINCT deskriptoren.s_xx AS s05,
705 deskriptoren.bedeutung,
706 deskriptoren.beschreibung,
707 deskriptoren.sn
708 FROM deskriptoren
709 WHERE (deskriptoren.ebene = 5);
710
711
712
713 CREATE VIEW s_06_s_01_view AS
714 SELECT d1.s_xx AS s01,
715 d2.s_xx AS s06
716 FROM (deskriptoren d1
717 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
718 WHERE (d2.ebene = 6);
719
720
721
722 CREATE VIEW s_06_view AS
723 SELECT DISTINCT deskriptoren.s_xx AS s06,
724 deskriptoren.bedeutung,
725 deskriptoren.beschreibung,
726 deskriptoren.sn
727 FROM deskriptoren
728 WHERE (deskriptoren.ebene = 6);
729
730
731
732 CREATE VIEW s_07_s_01_view AS
733 SELECT d1.s_xx AS s01,
734 d2.s_xx AS s07
735 FROM (deskriptoren d1
736 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
737 WHERE (d2.ebene = 7);
738
739
740
741 CREATE VIEW s_07_view AS
742 SELECT DISTINCT deskriptoren.s_xx AS s07,
743 deskriptoren.bedeutung,
744 deskriptoren.beschreibung,
745 deskriptoren.sn
746 FROM deskriptoren
747 WHERE (deskriptoren.ebene = 7);
748
749
750
751 CREATE VIEW s_08_s_01_view AS
752 SELECT d1.s_xx AS s01,
753 d2.s_xx AS s08
754 FROM (deskriptoren d1
755 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
756 WHERE (d2.ebene = 8);
757
758
759
760 CREATE VIEW s_08_view AS
761 SELECT DISTINCT deskriptoren.s_xx AS s08,
762 deskriptoren.bedeutung,
763 deskriptoren.beschreibung,
764 deskriptoren.sn
765 FROM deskriptoren
766 WHERE (deskriptoren.ebene = 8);
767
768
769
770 CREATE VIEW s_09_s_01_view AS
771 SELECT d1.s_xx AS s01,
772 d2.s_xx AS s09
773 FROM (deskriptoren d1
774 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
775 WHERE (d2.ebene = 9);
776
777
778
779 CREATE VIEW s_09_view AS
780 SELECT DISTINCT deskriptoren.s_xx AS s09,
781 deskriptoren.bedeutung,
782 deskriptoren.beschreibung,
783 deskriptoren.sn
784 FROM deskriptoren
785 WHERE (deskriptoren.ebene = 9);
786
787
788
789 CREATE VIEW s_10_s_01_view AS
790 SELECT d1.s_xx AS s01,
791 d2.s_xx AS s10
792 FROM (deskriptoren d1
793 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
794 WHERE (d2.ebene = 10);
795
796
797
798 CREATE VIEW s_10_view AS
799 SELECT DISTINCT deskriptoren.s_xx AS s10,
800 deskriptoren.bedeutung,
801 deskriptoren.beschreibung,
802 deskriptoren.sn
803 FROM deskriptoren
804 WHERE (deskriptoren.ebene = 10);
805
806
807
808 CREATE VIEW s_11_s_01_view AS
809 SELECT d1.s_xx AS s01,
810 d2.s_xx AS s11
811 FROM (deskriptoren d1
812 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
813 WHERE (d2.ebene = 11);
814
815
816
817 CREATE VIEW s_11_view AS
818 SELECT DISTINCT deskriptoren.s_xx AS s11,
819 deskriptoren.bedeutung,
820 deskriptoren.beschreibung,
821 deskriptoren.sn
822 FROM deskriptoren
823 WHERE (deskriptoren.ebene = 11);
824
825
826
827 CREATE VIEW s_12_s_01_view AS
828 SELECT d1.s_xx AS s01,
829 d2.s_xx AS s12
830 FROM (deskriptoren d1
831 JOIN deskriptoren d2 ON ((d2.vorgaenger = d1.id)))
832 WHERE (d2.ebene = 12);
833
834
835
836 CREATE VIEW s_12_view AS
837 SELECT DISTINCT deskriptoren.s_xx AS s12,
838 deskriptoren.bedeutung,
839 deskriptoren.beschreibung,
840 deskriptoren.sn
841 FROM deskriptoren
842 WHERE (deskriptoren.ebene = 12);
843
844
845
846 CREATE SEQUENCE staat_id_seq 604 CREATE SEQUENCE staat_id_seq
847 START WITH 1 605 START WITH 1
848 INCREMENT BY 1 606 INCREMENT BY 1
849 NO MINVALUE 607 NO MINVALUE
850 NO MAXVALUE 608 NO MAXVALUE
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)