Re: Withdraw PL/Proxy from commitfest
От | Martin Pihlak |
---|---|
Тема | Re: Withdraw PL/Proxy from commitfest |
Дата | |
Msg-id | 48FF077F.40009@gmail.com обсуждение исходный текст |
Ответ на | Re: Withdraw PL/Proxy from commitfest (David Fetter <david@fetter.org>) |
Список | pgsql-hackers |
David Fetter wrote: > DBI's DBD::Excel <http://search.cpan.org/~kwitknr/DBD-Excel-0.06/Excel.pm> > is a more extreme example of this kind of thing. You can get connect > strings that look like this: > > my $hDb = DBI->connect( > "DBI:Excel:file=dbdtest.xls", > undef, > undef, > { > xl_vtbl => { > TESTV => { > sheetName => 'TEST_V', > ttlRow => 5, > startCol => 1, > colCnt => 4, > datRow => 6, > datlmt => 4, > } > } > } > ); > > That last bit with the hash of hashes of hashes is probably where we'd > use CTEs to expand things out. Or we could just leave the attribute dict as it is and use something like: CREATE SERVER dbdtest FOREIGN DATA WRAPPER dbi OPTIONS ( datasource 'DBI:Excel:file=dbdtest.xls', attributes'{xl_vtbl => {TESTV => { ... } }}' ); CREATE USER MAPPING FOR bob SERVER dbdtest OPTIONS (username NULL, password NULL); The connection lookup for "dbtest" (user bob) would return: key value ----------- ------------------------------------------------------------ datasource DBI:Excel:file=dbdtest.xls attributes {xl_vtbl => {TESTV => { ... } }} username NULL password NULL Regards, Martin
В списке pgsql-hackers по дате отправления: