I’m using this perfect tool called Sublime Text 3 for a bunch of tasks. One of them is viewing SQL scripts from time to time. ST3 has perfect SQL highlighting, but what I miss the most is the context help functionality, e.g. I select “LEFT JOIN” and hit F1 hot key. But that’s not problem since ST3 has a lot of packages. To solve my problem I need GotoDocumentation package and some tuning. Here is my settings for GotoDocumentation:
// obj containing the docs for each scope
// these are merged with the default ones
// the key value pair represent scope -> doc url
// supported placeholders:
// - %(query)s the selected text/word
// - %(scope)s the current scope "sql": "http://www.postgresql.org/search/?q=%(query)s"
// if we have no docs for the current scope
// we will try using the fallback one,
// to disable set to false
Want to force your dev team to address Compiler Warnings rather than ignoring them?
Elevate Warnings to Errors:
1) Go to Project Options
2) Under Delphi Compiler, select Hints and Warnings
3) Expand the Output warnings item
4) For each important Warning you wish for your developers to address rather than ignore, select the drop-down list and select Error.
As you probably know PostgreSQL sources are managed by Git version control system. Which is great, but for me as SVN user it would be much better to get access to the sources using familiar tools, e.g. TortoiseSVN. Mainly because I don’t need write access, read mode only. There is a workaround for such guys.
Then at the Downloads Section get proper installer. I used lazarus-1.0.8-fpc-2.6.2-win32.exe and lazarus-1.0.8-fpc-2.6.2-win64.exe in my tests. These are the latest releases at the moment.
Here are the screen shots of the installation process where you can see what I had chosen:
I have Lazarus installed into C:\lazarus\ and hereafter I will use this path.
Now it’s time for PostgresDAC. At the moment many Laarus IDE functions require the source and warns if the source of a unit is missing. Thus we need PostgresDAC with sources version. Sources are available for licensed users in their profile.
I have extracted PostgresDAC sources to C:\PostgresDAC\.
Install PostgresDAC into the IDE
In the Lazarus IDE choose open package and select dclPostgresDACL.lpk. This is the design time package. Then in the Package window choose Use → Install.
Confirmation about rebuild will appear.
Choose “Yes”. Wait for some time. After successful rebuild Lazarus will reopen itself. Tada! We got it!
Now we may open some demo projects and play some time.
Playing with fresh PostgreSQL 9.2beta2 I cannot find spclocation column of a system catalog pg_tablespace. First my thought was that I’m too tired. But then I found mentioning about this at pgsql-hackers by Magnus Hagander:
And IIRC, we don’t actually *use* spclocation anywhere. How about we
just get rid of them as independents?
Oh, really?!!! WTF? How about other developers, ha? I’m using this. I really do. Don’t know how about other guys, but I will need additional nasty checks for server version to know what should I use: pg_get_tablespace_location(oid) or tablespace.spclocation