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

From Pavel Stehule
Subject Re: proposal or just idea for psql - show first N rows from relation backslash statement
Date
Msg-id CAFj8pRB5VyRt9BwfNooLjzNpSkc9hWmQy+zHNOiXmrEXRLG_Gg@mail.gmail.com
Whole thread Raw
In response to Re: proposal or just idea for psql - show first N rows from relation backslash statement  (Stephen Frost <sfrost@snowman.net>)
Responses Re: proposal or just idea for psql - show first N rows from relation backslash statement  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
2013/2/14 Stephen Frost <sfrost@snowman.net>:
> * Pavel Stehule (pavel.stehule@gmail.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



pgsql-hackers by date:

Previous
From: Ants Aasma
Date:
Subject: Re: Alias hstore's ? to ~ so that it works with JDBC
Next
From: Tom Lane
Date:
Subject: Re: FDW for PostgreSQL