Skip to content

Commit

Permalink
Exclude PostgreSQL internal views
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Nov 5, 2024
1 parent 6221282 commit af0340a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Schema/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -926,8 +926,13 @@ protected function getViews() : array
{
$this->views = [];

foreach( $this->getSchemaManager()->listViews() as $view ) {
$this->views[$view->getShortestName( $view->getNamespaceName() )] = $view;
foreach( $this->getSchemaManager()->listViews() as $view )
{
$name = $view->getShortestName( $view->getNamespaceName() );

if( strncmp( $name, 'pg_', 3 ) || strncmp( $name, '_pg_', 4 ) ) {
$this->views[$name] = $view;
}
}
}

Expand Down

0 comments on commit af0340a

Please # to comment.