On Wed, Feb 13, 2013 at 6:07 PM, Pavel Stehule <pavel.steh...@gmail.com>wrote:
> Hello > > probably one from my top ten SQL statement will be > > SELECT * FROM some_relation LIMIT 10 > > what do you thinking about creating special statement for this purpose? > > possible syntax > > -- ViewTable > \vt table_name [rows] > > or > > \sample table_name [rows] > > a implementation with autocomplete is terrible simple > > I liked this idea, but thinking better we can implement a way to users create your own meta-commands to run: * another meta commands (like an alias) * SRFs * arbitrary SQLs All of them must accept arguments... some like this: \mset vt :table :rows 'select * from :table limit :rows' Then we can do exactly what you need: \vt foo 10 \unset vt I don't know if it's a desired feature but I would love if it exists. Best regards, -- Fabrízio de Royes Mello Consultoria/Coaching PostgreSQL >> Blog sobre TI: http://fabriziomello.blogspot.com >> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello >> Twitter: http://twitter.com/fabriziomello