Re: [GENERAL] Including SQL files

2016-03-23 Thread mariusz
On Mon, 2016-03-21 at 15:58 +0100, Alexander Farber wrote: > Thanks for your replies. > > > While I use "\i" regularly I just didn't realize it would be suitable > here as well :-) > \ir migth be a better option for a bundle of scripts, related to main script (words.sql in your case), not to cwd

Re: [GENERAL] Including SQL files

2016-03-21 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber Sent: Monday, March 21, 2016 10:43 AM To: pgsql-general Subject: [GENERAL] Including SQL files Hello fellow pgsql users, I am programming a word game backend in PL/pgSQL and have

Re: [GENERAL] Including SQL files

2016-03-21 Thread Alexander Farber
Thanks for your replies. While I use "\i" regularly I just didn't realize it would be suitable here as well :-) Regards Alex

Re: [GENERAL] Including SQL files

2016-03-21 Thread Adrian Klaver
On 03/21/2016 07:42 AM, Alexander Farber wrote: Hello fellow pgsql users, I am programming a word game backend in PL/pgSQL and have already reached a point, where (too) many stored functions are declared in a single file words.sql: # SELECT proname || '(' || oidvectortypes(proargtypes) || ')'

Re: [GENERAL] Including SQL files

2016-03-21 Thread Victor Yegorov
2016-03-21 16:42 GMT+02:00 Alexander Farber : > I would prefer to have every stored function in a separate file (which > would make reading git history easier too) and include them from words.sql. > > Is there such a thing for PostgreSQL 9.5.1 available please and if not - > could you share your a

Re: [GENERAL] Including SQL files

2016-03-21 Thread Pavel Stehule
Hi 2016-03-21 15:42 GMT+01:00 Alexander Farber : > Hello fellow pgsql users, > > I am programming a word game backend in PL/pgSQL and have already reached > a point, where (too) many stored functions are declared in a single file > words.sql: > > # SELECT proname || '(' || oidvectortypes(proargty

[GENERAL] Including SQL files

2016-03-21 Thread Alexander Farber
Hello fellow pgsql users, I am programming a word game backend in PL/pgSQL and have already reached a point, where (too) many stored functions are declared in a single file words.sql: # SELECT proname || '(' || oidvectortypes(proargtypes) || ')' FROM pg_proc INNER JOIN pg_namespace ns ON