Re: PostgreSQL Top 10 Wishlist

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: PostgreSQL Top 10 Wishlist
Дата
Msg-id 20060113202501.GA23278@fetter.org
обсуждение исходный текст
Ответ на Re: PostgreSQL Top 10 Wishlist  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
On Fri, Jan 13, 2006 at 02:23:29PM +0100, Martijn van Oosterhout wrote:
> On Thu, Jan 12, 2006 at 08:51:44PM -0800, rlee0001 wrote:
> > 1.
> > Two new special variables in triggers functions (TG_STATEMENT and
> > TG_EFFECTIVE_STATEMENT) which returns the statement that triggered
> > the trigger.
>
> Which would that be? The statement that directly invoked the
> trigger, or the one the user typed, or would you want a list of all
> of them?

This would be pretty cool either way.

> > 4.
> > The ability to view the DDL for objects. Logically I know that
> > this HAS to be possible already but I can't figure it out and a
> > search of the documentation doesn't mention it. You can do this in
> > EMS PostgreSQL Manager but I can't figure out how to query it on
> > my own.
>
> psql gives you that. If you give -E it'll even show you the queries
> it uses to make the info. Also, the information_schema should have
> most stuff you want.

Actually, this is a TODO :)

> > 5.
> > The SET and ENUM data types. I know MySQL is cheap and evil but
> > even it has them. Both are really just Integers attached to some
> > Metadata. You have no idea how many descriptor tables I have for
> > simple enumerations.  Some have less than 10 items in them!
>
> Someone actually mosted a patch that did this. Funnily enough, it'd
> probably be implemented by creating seperate tables for each ENUM to
> do the lookup. It's just suger-coating really...

But it's *tasty* sugar coating, and you don't have to mess around with
extra messing to get the ordering you've set.

> > 6.
> > Cross database queries. I'd like to be able to query a MS SQL
> > Server database from within PL/PGSQL. Or at least other databases
> > on the same server. Granted it might not be possible to JOIN,
> > UNION or Subquery against them but I'd at least like to be able to
> > perform a query and work with the results. We currently have to
> > feed a postgresql database daily snapshots the live Microsoft SMS
> > network data using a DTS package. Being able to access the Live
> > data (especially if we could join against it) would be awesome.
>
> dblink does it for postgres DBs, there are similar modules for
> connections to other databases.

DBI-Link for other data sources.

> > 8.
> > The ability to use procedural-language extensions everywhere, not just
> > in functions.
>
> Like where? Give an example.

I'm thinking in-line anonymous blocks of your favorite PL.

> > 9.
> > The ability to nest fields within fields. For example:
> >   PERSON
> >      NAME
> >          LAST
> >          FIRST
> >      PHONE
>
> You can sort of do this, using rowtypes. Havn't nested more than one
> level though. Not sure why you'd want this though. A database stores
> data, presentation is the application's job.

WITH RECURSIVE is on the TODO list.  Maybe he's referring to that.

> So, create a type that does that. PostgreSQL is extensible. It's got
> data types for ISBNs, Internet addresses and even an XML document
> type.  Compared to that a simple phone number field would be
> trivial.

I'd say a phone number is *much* harder to do right if you're storing
phone numbers from more than one country.

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 415 235 3778

Remember to vote!

В списке pgsql-general по дате отправления:

Предыдущее
От: John Gray
Дата:
Сообщение: Re: PostgreSQL Top 10 Wishlist
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Concept about stored procedures