Skip to content

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

Open
Vlczech wants to merge 13 commits intonette:masterfrom
Vlczech:master
Open

Support for use tablename acquired as regclass at previous query in PostgreSQL (prevent to "delimite" two times)#263
Vlczech wants to merge 13 commits intonette:masterfrom
Vlczech:master

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 2 times, most recently from ba62a2a to 5e1c47e Compare April 30, 2021 10:10
@dg dg force-pushed the master branch 3 times, most recently from f8e1e59 to 4862e4d Compare May 4, 2021 19:12
@dg dg force-pushed the master branch 4 times, most recently from 2986f4e to a8541e0 Compare May 31, 2021 17:05
@dg dg force-pushed the master branch 4 times, most recently from a7aaa31 to ea8d97b Compare August 29, 2021 14:55
@dg dg force-pushed the master branch 4 times, most recently from 66dbaa3 to 9f18416 Compare September 21, 2021 00:03
@dg dg force-pushed the master branch 2 times, most recently from f0e3796 to 755fea4 Compare November 8, 2021 15:28
@dg dg force-pushed the master branch 7 times, most recently from 8e0c1ee to 0cb2c17 Compare December 12, 2021 03:54
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