Skip to content

Commit 90b5977

Browse files
committed
Remove wrong error check
1 parent 43c2637 commit 90b5977

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

README.md

-5
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,6 @@ The postgres protocol doesn't allow more than 65534 (16bit) parameters. If you r
404404
405405
When using SASL authentication the server responds with a signature at the end of the authentication flow which needs to match the one on the client. This is to avoid [man in the middle attacks](https://en.wikipedia.org/wiki/Man-in-the-middle_attack). If you receive this error the connection was canceled because the server did not reply with the expected signature.
406406

407-
##### RESERVED_METHOD_NAME
408-
> X is a reserved method name
409-
410-
When implementing custom types, the name of the type is used for the method added to the `sql` object. There are a few reserved method names which can't be used. This is one of them.
411-
412407
##### NOT_TAGGED_CALL
413408
> Query not called as a tagged template literal
414409

lib/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,6 @@ function Postgres(url, options) {
286286
}
287287

288288
options.types && entries(options.types).forEach(([name, type]) => {
289-
if (name in sql)
290-
throw errors.generic({ message: name + ' is a reserved method name', code: 'RESERVED_METHOD_NAME' })
291-
292289
sql.types[name] = (x) => ({ type: type.to, value: x })
293290
})
294291
}

0 commit comments

Comments
 (0)