diff --git a/Cargo.lock b/Cargo.lock
index d95cdae0e..8618a4ed9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1160,12 +1160,6 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
-[[package]]
-name = "foldhash"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
-
[[package]]
name = "form_urlencoded"
version = "1.2.2"
@@ -1473,7 +1467,7 @@ checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
dependencies = [
"allocator-api2",
"equivalent",
- "foldhash 0.1.5",
+ "foldhash",
]
[[package]]
@@ -1481,11 +1475,6 @@ name = "hashbrown"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
-dependencies = [
- "allocator-api2",
- "equivalent",
- "foldhash 0.2.0",
-]
[[package]]
name = "hashlink"
@@ -1989,15 +1978,6 @@ dependencies = [
"logos-codegen",
]
-[[package]]
-name = "lru"
-version = "0.16.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39"
-dependencies = [
- "hashbrown 0.16.1",
-]
-
[[package]]
name = "ls-types"
version = "0.0.6"
@@ -2991,7 +2971,6 @@ dependencies = [
"globset",
"ignore",
"json-strip-comments 3.1.0",
- "lru",
"pgls_analyse",
"pgls_analyser",
"pgls_catalog",
diff --git a/crates/pgls_workspace/Cargo.toml b/crates/pgls_workspace/Cargo.toml
index 280b3733c..bfdb1e9e5 100644
--- a/crates/pgls_workspace/Cargo.toml
+++ b/crates/pgls_workspace/Cargo.toml
@@ -13,7 +13,6 @@ version = "0.0.0"
[dependencies]
globset = "0.4.16"
-lru = "0.16.3"
ignore = { workspace = true }
json-strip-comments = { workspace = true }
diff --git a/crates/pgls_workspace/src/workspace/server.rs b/crates/pgls_workspace/src/workspace/server.rs
index 14d207215..6bc5bae19 100644
--- a/crates/pgls_workspace/src/workspace/server.rs
+++ b/crates/pgls_workspace/src/workspace/server.rs
@@ -1,4 +1,5 @@
use std::{
+ borrow::Borrow,
collections::HashMap,
fs,
hash::{DefaultHasher, Hash, Hasher},
@@ -29,8 +30,8 @@ use pgls_analyser::{
Analyser, AnalyserConfig, AnalyserParams, AnalysisResult, Direction, FileKind,
LinterDiagnostic, LinterOptions, MigrationSection, RuleFix,
};
-use pgls_catalog::resolve::{Reference, ResolveParams, resolve};
-use pgls_catalog::{Catalog, CatalogBase, Session, TransactionMode};
+use pgls_catalog::resolve::{ColumnSource, Reference, ResolveParams, resolve};
+use pgls_catalog::{Catalog, CatalogBase, Origin, Session, TransactionMode};
use std::borrow::Cow;
use pgls_catalog::Snapshot;
@@ -109,13 +110,22 @@ pub struct WorkspaceServer {
/// The indexed database snapshot the catalog starts from
catalog_base: Mutex