On May 31, 2009 06:46:06 pm Markus Hoenicka wrote:
> Phil Longstaff writes:
>  > According to postgresql documentation, there is a standard information
>  > schema which exists in all databases
>  > (http://www.postgresql.org/docs/8.3/interactive/information-schema.html)
>  >.  Is there any easy way of having these extra tables *not* returned from
>  > dbi_conn_get_table_list() ?  I suppose I can always get the list and
>  > remove them, but it would be easier if they weren't returned in the
>  > first place.
>
> I see from the implementation of the dbd_list_tables() function that
> the pgsql driver removes all tables matching the regexp '^pg_'
> anyway. These appear to be additional schemas as well. This could be
> expanded to exclude 'information_schema' as well. Question is, should
> this be the default? Would anyone *want* these tables to be listed? I
> assume no one wants these, as they are implementation-specific to
> PostgreSQL and should not be returned by a database-independent
> function that lists all tables. I'm open to discussions.

I currently use the count of tables (zero or non-zero) to determine whether 
the db is empty or not and pop up a dialog box for the user.  Works for 
sqlite3 and mysql but not pgsql.  I'd prefer to have them *not* returned, but 
adding a flag or a new api to return all special tables would be ok.

Phil
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel

Reply via email to