473,394 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

{REPOST, CLARIFIED} How to recognize PG SQL files?

On Wed, Aug 06, 2003 at 12:55:52PM -0400, Joel Burton wrote:

Reposting, with some clarification to my request. Thanks to the several
responses I received originally.

Yes, I know that a perfectly vaild PGSQL SQL file could contain only
ANSI SQL and therefore not be recognized as PG-related. In that case,
though, it would be recognized by Vim's ANSI SQL coloring, and given
that's all this file contains, that's no problem. ;)

However, given that many people edit pg_dump files (which do contain
pgsql-isms in most cases), and many other people do use non-ANSI PG
features, I figure that I should be able to recognize 95% of the files,
and that's a win since it will consistent highlight PG syntax and make
it easier to scan files, catch typos, etc.

Some easy things:

* if a filename ends with ".pgsql", it will use PG syntax coloring

* if a file contains a comment with "pgsql" in it in the first few
lines, it will use PG syntax coloring

* if a file contains the comments that pg_dump puts in a file, it will
use PG syntax coloring.

I'd still like to catch other cases, and still have the following
questions: what features among our extensions are unique to us, and what
features are used by other common DBs? People that have more recent
experience with MySQL, Oracle, SQLServer, etc. can probably answet this
question.

Thanks, everyone!

- j.
I'm writing a syntax mode for PG for Vim (posted an early version
earlier today) and would like to have Vim recognize that this is a PG
SQL file (rather than a MySQL file or an Oracle file or such).

I'm trying to brainstorm what the unique-looking parts of PG's syntax
are. These need to be present in PG SQL files (& hopefully not too
obscure) but not present in other DB SQL files.

The PG manual states how PG differs from SQL standards, but not how it
differs from other popular databases. I've used MySQL and Oracle in the
past, but not recently, and haven't use DB2 or SQLServer in ages and
don't have docs for them anymore.

I have a few possible suggestions. Can anyone:

* tell me if these are used in other DB systems (& shouldn't be part of
my syntax)

or

* provide other ideas for unique PG syntax
My ideas:

* \connect

* template1

* "from pg_" (selecting from a PG system table)

* "create rule"

* plpgsql, plperl, plpython, pltcl, pltclu, plruby (& now plphp, too, I
suppose! ;) )

* "nextval(", "currval("
I'd love to find something common, like "SERIAL" or "CREATE SEQUENCE" or
such, but I suspect that other commonly-used databases use these.


--

Joel BURTON | jo**@joelburton.com | joelburton.com | aim: wjoelburton
Independent Knowledge Management Consultant

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 11 '05 #1
0 1366

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jerome Cohen | last post by:
This problem is driving us mad, and I saw someone else posting a very similar problem, again no support from MS! ----------------------- Win2K/IIS 5.0, web farm load balanced by Local director....
8
by: pacs34 | last post by:
I just read some stuff about XHTML 2.0 and it sounds fascinating so I have been trying to create a small test doc which has a few graphics files but whenever I submit it to the W3 validator I get...
12
by: Arno R | last post by:
Hi all, This is a repost of a message posted at october 6. The answer I got was about MapiMessages.AttachmentIndex. I think I need the MSMAPI32.OCX to use this. (I don't have this file on my PC)...
1
by: Yannick Turgeon | last post by:
Hello, This is a repost (see under the "dotted" line) from 2 days ago. Hope someone could help. Norton Antivirus 2003 is installed on this computer. Could it cause a problem? Another...
1
by: JoeS | last post by:
Is there anyway to share a single pch file between projects in VC 7.0? I have 300+ projects each of which creates its own pch. All projects include the exact same header files in the precompiled...
14
by: Steve McLellan | last post by:
Hi, Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I've got a reasonably large mixed C++ project, and after a number of builds (but not a constant...
2
by: Peter Ignarson | last post by:
Hi there - I am writing a paint program (I am following a learning tutorial, there is no point to writing a paint program) and I want to extend it so that I can copy the contents of my drawing and...
32
by: Jon Paal | last post by:
trying to use this script for scrolling tables found at this link: http://www.litotes.demon.co.uk/example_scripts/tableScroll.html The top left corner in the table grid is hidden from being...
1
by: =?Utf-8?B?Uk1C?= | last post by:
I am using the Configuration Application Block, and I want to keep my config files in a folder off of the app root called config. I have modified the app.config to point to the folder with a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.