Query Posgres databases.
+This extension adds support for connecting to PostgreSql Server databases using the #!connect psql
magic command. For more information, run a cell using the #!sql
magic command.
+ "),
+ "text/html");
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Interactive.PostgreSql.Tests/PSqlTheoryAttribute.cs b/src/Microsoft.DotNet.Interactive.PostgreSql.Tests/PSqlTheoryAttribute.cs
new file mode 100644
index 0000000000..5f244168a8
--- /dev/null
+++ b/src/Microsoft.DotNet.Interactive.PostgreSql.Tests/PSqlTheoryAttribute.cs
@@ -0,0 +1,24 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using Xunit;
+
+namespace Microsoft.DotNet.Interactive.PostgreSql.Tests;
+
+public sealed class PSqlTheoryAttribute : TheoryAttribute
+{
+ private static readonly string _skipReason;
+
+ static PSqlTheoryAttribute()
+ {
+ _skipReason = PSqlFactAttribute.TestConnectionAndReturnSkipReason();
+ }
+
+ public PSqlTheoryAttribute()
+ {
+ if (_skipReason is not null)
+ {
+ Skip = _skipReason;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Microsoft.DotNet.Interactive.PostgreSql/ConnectPostgreSqlDirective.cs b/src/Microsoft.DotNet.Interactive.PostgreSql/ConnectPostgreSqlDirective.cs
new file mode 100644
index 0000000000..a529197c0b
--- /dev/null
+++ b/src/Microsoft.DotNet.Interactive.PostgreSql/ConnectPostgreSqlDirective.cs
@@ -0,0 +1,36 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Microsoft.DotNet.Interactive.Connection;
+using Microsoft.DotNet.Interactive.Directives;
+
+namespace Microsoft.DotNet.Interactive.PostgreSql;
+
+public class ConnectPostgreSqlDirective : ConnectKernelDirective