Record a direct operation MediaWiki the pit that the database encounters

Source: Internet
Author: User

My MediaWiki is using the PostgreSQL database, and when you go into the MediaWiki database, run the SQL

Select *  from Pg_tables;

You will find that the schemaname of the MediaWiki data table is MediaWiki, but the schemaname of the table we created is public,

So then you run the SELECT * from table_name directly; , you will find no information to show that there is no such data table,

WORKAROUND: SELECT * from Mediawiki.table_name; That is, you need to add schemaname before the table name. Check it out and find out how the great God explained PostgreSQL's SchemaName:

The schema concept is a bit like a namespace or as a directory in a filesystem, and the difference is that schema nesting can no longer be nested within the schemas.
Objects such as tables, functions, etc. are stored under each schema, the same schema cannot have duplicate object names, but can be duplicated under different schemas.

Wait, wait, etc... The

Record a direct operation MediaWiki the pit that the database encounters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.