Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for use tablename acquired as regclass at previous query in PostgreSQL (prevent to "delimite" two times) #263

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Vlczech
Copy link

@Vlczech Vlczech commented Oct 5, 2020

  • bug fix / new feature? Partially both
  • BC break? no
  • doc PR: nette

If data contains special char, table is named with quotation marks also. Thus regclass returns name with quotes and for example operation ->table() delimites such delimited regclass name obtained from SELECT for the second time. So for example $tbl='someschema."some-table"' is in $db->table() delimited to "someschema"."""some-table""".

Note: Tested for PostgreSQL only.

dg and others added 13 commits July 10, 2020 18:29
If data contains special char, table is named with quotation marks also. Thus regclass returns name with quotes and for example operation ->table() delimites such delimited regclass name obtained from SELECT for the second time. So for example $tbl='someschema."some-table"' is in $db->table() delimited to "someschema"."""some-table""".
Note: Tested for PostgreSQL only.
@dg
Copy link
Member

dg commented Oct 6, 2020

Does this feature apply only to Postgresql, or any other databases?

@dg dg force-pushed the master branch 2 times, most recently from a9e5763 to c3cc31a Compare October 6, 2020 17:24
@Vlczech
Copy link
Author

Vlczech commented Oct 7, 2020

@dg: I tried to code it to be universal as well for other databases for reverse operation to delimite(), but don't know if any other database has some feature like regclass in postgresql. I don't like to have this feature in ResultSet if it's usable for something specific only (in this case PostgreSQL), so i decided to put it at the driver level :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants