question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add the "current_database()" to our builtins

See original GitHub issue

Postgres has a nice current_database() function that returns the name of the database you’re connected to. This is a nice utility function to have. The proposal is to map it onto sys::get_current_database().

The main reason I ran into this was that I was working on a fix to handle “cannot drop the currently open database” error and realized that the easiest way to write a test for this would be to actually ask the name of the test database first and then attempt to delete it, rather then set up a whole different test where I control the test database name.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
elpranscommented, Feb 11, 2020

+1 for the separate functions

0reactions
elpranscommented, Jul 24, 2020

Closing this, since the subject is done, and current_user depends on a functional role system, which we don’t have yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

12.1 Built-In Function and Operator Reference
The following table lists each built-in (native) function and operator and provides a short ... ADDDATE(), Add time values (intervals) to a date...
Read more >
MySQL By Examples for Beginners
Modify a table, e.g., ADD COLUMN and DROP COLUMN ALTER TABLE tableName ADD ... To check the version of your MySQL server, issue...
Read more >
Import database objects into the current Access database
You can import tables, queries, forms, reports, macros, or modules from one Access database into your current database. When you import an object,...
Read more >
How to Create Custom DIY Built Ins With Stock Cabinets
You can create a really custom look with unfinished stock cabinets as your base for the project. This means when you get an...
Read more >
Commands - Redis
CF.ADDNX. Adds an item to a Cuckoo Filter if the item did not exist previously. ... FLUSHDB. Remove all keys from the current...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found