From: | Ian Lawrence Barwick <barwick(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Pavel Stehule <pavel(dot)stehule(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-13 23:34:42 |
Message-ID: | CAB8KJ=jygrAPxwtOH9S3ED+6m9LdsZLWZiOGg51U4hzBiG=JzQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2013/2/14 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
>> * Pavel Stehule (pavel(dot)stehule(at)gmail(dot)com) wrote:
>>> SELECT * FROM some_relation LIMIT 10
>>>
>>> what do you thinking about creating special statement for this purpose?
>
>> I'd rather extend TABLE to support a limit clause or something.
>
> Can't you pretty much do this already in psql with FETCH_COUNT? I see
> no good reason to invent more SQL syntax.
Doesn't that just split up the retrieval of the result set into blocks of
FETCH_COUNT rows, i.e. does not limit the result set?
Personally I set commonly-used queries as a psql variable, though
what Pavel suggests sounds useful and AFAICT is not additional SQL
syntax, just (yet another) psql slash command.
Ian Barwick
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-02-13 23:44:23 | Re: proposal or just idea for psql - show first N rows from relation backslash statement |
Previous Message | Tom Lane | 2013-02-13 23:26:14 | Re: Btrfs clone WIP patch |