Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eljWd-0003eX-SD for pgsql-general@arkaria.postgresql.org; Tue, 13 Feb 2018 22:58:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eljWb-0006Ve-Sg for pgsql-general@arkaria.postgresql.org; Tue, 13 Feb 2018 22:58:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eljWb-0006VV-HM for pgsql-general@lists.postgresql.org; Tue, 13 Feb 2018 22:58:09 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eljWR-000879-GX for pgsql-general@lists.postgresql.org; Tue, 13 Feb 2018 22:58:07 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id CD6441628; Tue, 13 Feb 2018 23:57:55 +0100 (CET) Date: Tue, 13 Feb 2018 23:57:55 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: I do not get the point of the information_schema Message-ID: <20180213225755.hbpadizwav3ma2kn@hjp.at> References: <303d3d2c-ef0b-af0a-e4d1-4b17a029fc0f@gelassene-pferde.biz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hyieyp5uuzaijzna" Content-Disposition: inline In-Reply-To: <303d3d2c-ef0b-af0a-e4d1-4b17a029fc0f@gelassene-pferde.biz> User-Agent: NeoMutt/20170113 (1.7.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --hyieyp5uuzaijzna Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2018-02-12 23:01:41 +0100, Thiemo Kellner wrote: > I try to implement SCD2 on trigger level and try to generated needed code= on > the fly. Therefore I need to read data about the objects in the database.= So > far so good. I know of the information_schema and the pg_catalog. The > documentation for the information_schema states that it 'is defined in the > SQL standard and can therefore be expected to be portable and remain > stable'. I can think of a sensible meaning of portable. One cannot port it > to MariaDB, can one? You don't port the information schema to MariaDB. The information schema is provided by the database. The *use* of the information schema is portable between standard- conforming databases, however. You can use=20 select table_schema, table_name from information_schema.tables where table_type=3D'BASE TABLE'; on both PostgreSQL and MariaDB to get a list of tables. (That said, it looks like both PostgreSQL and MariaDB include additional columns beyond those mandated by the standard - you can't rely on those, of course. And some databases like Oracle don't even have an information schema.) hp --=20 _ | Peter J. Holzer | we build much bigger, better disasters now |_|_) | | because we have much more sophisticated | | | hjp@hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson --hyieyp5uuzaijzna Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAlqDbW8ACgkQ8g5IURL+ KF384A/+MGCt5KwR4i4VWfLIKTUGR4zCwtwmCUf/NRpJdBXDgWC8xzBEDbd7/kio lk7H0/LbOXVhLr2lwELJ2y/U/HnM1NhM6WDqrZOdO5twKZOnm3AbkoBXRkJ8dhxh 8Cu1yxnfAaAg7LE4DzBPgBLsyHly8ICroT9csCvPQz2WR59o5kKXqk08fTkFLBMA /QwdteJb4nnFT+/mSHLHndMR+ac+kKWJit48GrOOpJ45/yXOj2dR90M5ZuJ7aSUK hXTBBnlA3tBAAzq0sZHpzjulD0+YJ1y3a3ppbSCm3eh2xAx0sbZ/ik53uSI3SfJn be0Hw4EYzdsrLVEwUtFIeB726dpOf4/hoo9qD60Rx1GF3lT81v4tF0RtPH5o04Bb xC9JBw5aCpvJtHRmw1CxLw4o0qNckXaDffCOa8U6+gPQClAOKZp4WOMHm/SHOJoO Ls+zZPFWxT3/Pfp3kbJAMi2VJRDcpGgdg8gCNWcjw/5HQES7sWc7qBX3QtzxiSL/ AqZAUSqCSg9nIXVB+bhN6+uv81cj3G5gCGPjFBQNoaYsh6EK46bKInUR7PKVsN9+ NlCylYsA9y3ZIKFprODgp88eUKph/cmMFtKLRejv7dY6DE8AMQ2tZs7RqsG+pjA6 gIKw9HnWslGYpxzaYjcjxcX04IYiKROxTyhqNJKtTPalYcuwXUI= =scLI -----END PGP SIGNATURE----- --hyieyp5uuzaijzna--