Re: datacopy syntax
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 17 Aug 2011 09:26:50 +0200 Frediano Ziglio <[email protected]> wrote: > > The current parameters are: > > > > [-S server/username/password/database/table_or_view] > > [-D server/username/password/database/table] > > > > You see the problem immediately: how to omit the username & > > password? > > > > Use strsep instead of strtok and pass empty strings like > > -S my_server///my_db/my_table Yes, that would work. But if datacopy honored $DSQUERY and the default dbname was OK, the syntax would be ////my_table which is just plain ridiculous, don't you agree? Besides, nowhere else do we use slashes that way. > > I propose to change the syntax to emulate a URL: > > > > -S [username[:passwd]@][dbname.][schema.]tablename > > why not using another parameter like --source to avoid clash? (BTW, the above syntax left out the servername by mistake.) Simpler code. Simpler documentation. Better usability. --jkl