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 :-)

@dg dg added this to the v3.1 milestone Oct 8, 2020
@dg dg force-pushed the master branch 2 times, most recently from e91b234 to 953502b Compare October 15, 2020 22:53
@dg dg force-pushed the master branch 6 times, most recently from 52d72e1 to fd0d57c Compare October 30, 2020 13:01
@dg dg force-pushed the master branch 2 times, most recently from f06c30e to 1b974d3 Compare November 25, 2020 22:28
@dg dg force-pushed the master branch 26 times, most recently from a329d1b to 9f82d9d Compare September 5, 2024 02:37
@dg dg force-pushed the master branch 2 times, most recently from 1769a67 to b02f117 Compare January 9, 2025 22:12
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.

3 participants