Re: proposal or just idea for psql - show first N rows from relation backslash statement

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, fabriziomello(at)gmail(dot)com, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal or just idea for psql - show first N rows from relation backslash statement
Date: 2013-02-14 16:32:07
Message-ID: CAFj8pRB5VyRt9BwfNooLjzNpSkc9hWmQy+zHNOiXmrEXRLG_Gg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/2/14 Stephen Frost <sfrost(at)snowman(dot)net>:
> * Pavel Stehule (pavel(dot)stehule(at)gmail(dot)com) wrote:
>> it is not true
>
> It most certainly is true- did you look at the command?
>
> SELECT top10('foo');
>
> Note that it's "top10", implying that it'd return the first 10 records.
> That's only 2 characters more than:

In current implementation you need a a polymorphic function

and then you have to write

SELECT (top10('foo')).*

or

SELECT * FROM top10('foo')

Regards

Pavel

>
> CALL top10('foo');
>
> It's not as short as '\vt foo', but I never claimed that it was, nor do
> I feel it's particularly valuable to shorten it down to that level.
>
> Thanks,
>
> Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-02-14 16:34:17 Re: FDW for PostgreSQL
Previous Message Ants Aasma 2013-02-14 16:24:11 Re: Alias hstore's ? to ~ so that it works with JDBC