Iter returns an iterator through the search path. We must include the implicit pg_catalog and temporary schema at the beginning of the search path, unless they have been explicitly set later by the user. "The system catalog schema, pg_catalog, is always searched, whether it is mentioned in the path
()
| 106 | // first (even before pg_catalog)." |
| 107 | // - https://www.postgresql.org/docs/9.1/static/runtime-config-client.html |
| 108 | func (s SearchPath) Iter() SearchPathIter { |
| 109 | implicitPgTempSchema := !s.containsPgTempSchema && s.tempSchemaName != "" |
| 110 | sp := SearchPathIter{ |
| 111 | paths: s.paths, |
| 112 | implicitPgCatalog: !s.containsPgCatalog, |
| 113 | implicitPgTempSchema: implicitPgTempSchema, |
| 114 | tempSchemaName: s.tempSchemaName, |
| 115 | } |
| 116 | return sp |
| 117 | } |
| 118 | |
| 119 | // IterWithoutImplicitPGSchemas is the same as Iter, but does not include the |
| 120 | // implicit pg_temp and pg_catalog. |
no outgoing calls
no test coverage detected