Skip to content

Commit baf4ebc

Browse files
Merge pull request #298758 from xfz11/serviceconnector/pg
update code sample for postgres
2 parents 5562b87 + f938f9d commit baf4ebc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

articles/service-connector/includes/code-neon-postgres-secret.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ms.author: wchi
138138
```
139139
1. In code, get the PostgreSQL connection information from environment variables added by Service Connector.
140140
```javascript
141-
const { Client } = require('pg');
141+
import { Client } from 'pg';
142142

143143
(async () => {
144144
const client = new Client({

articles/service-connector/includes/code-postgres-me-id.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ For more tutorials, see [Use Spring Data JDBC with Azure Database for PostgreSQL
253253

254254
```javascript
255255
import { DefaultAzureCredential, ClientSecretCredential } from "@azure/identity";
256-
const { Client } = require('pg');
256+
import { Client } from 'pg';
257257

258258
// Uncomment the following lines corresponding to the authentication type you want to use.
259259
// For system-assigned identity.

articles/service-connector/includes/code-postgres-secret.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ms.author: wchi
138138
```
139139
1. In code, get the PostgreSQL connection information from environment variables added by Service Connector.
140140
```javascript
141-
const { Client } = require('pg');
141+
import { Client } from 'pg';
142142

143143
(async () => {
144144
const client = new Client({

0 commit comments

Comments
 (0)