If a table name have a comma in its name, export_objects is not able to fetch the table schema statement.
Got the table statement at schema level like this
select export_objects('','san','false');
CREATE TABLE san.","
(
name varchar(80)
);
But while fetching specific table schema statement comma in name does not work
phjain=> select export_objects('','san.,','false');
ERROR 2569: Catalog object san. does not exist
phjain=> select export_tables('','san.,');
ERROR 2569: Catalog object san. does not exist
I know this is a comma delimited string, but looking for a way to escape comma in table/schema/projection name.
Escape , in table name in export_objects
Moderator: NorbertKrupa
-
- Newbie
- Posts: 4
- Joined: Sat Oct 31, 2015 12:25 pm
-
- Newbie
- Posts: 4
- Joined: Sat Oct 31, 2015 12:25 pm
Re: Escape , in table name in export_objects
Same problem for dot(.) and spaces at start and end of names.
Seems like Vertica is parsing object names list based on using delimiters . and , after trimming.
Seems like Vertica is parsing object names list based on using delimiters . and , after trimming.
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Escape , in table name in export_objects
That must be a bug. The only way to get the table to export us by just specifying the table schema:
Code: Select all
dbadmin=> CREATE SCHEMA san;
CREATE SCHEMA
dbadmin=> CREATE TABLE san.","
dbadmin-> (
dbadmin(> name varchar(80)
dbadmin(> );
CREATE TABLE
dbadmin=> select export_tables('','san');
export_tables
-------------------------------------------------------------------------
CREATE SCHEMA san;
CREATE TABLE san.","
(
name varchar(80)
);
(1 row)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.