Re: [SQL] id and ID in CREATE TABLE
Joshua b. Jore ; http://www.greentechnologist.org On Sat, 20 Jul 2002 [EMAIL PROTECTED] wrote: > Why is like this ? Why not letting them upper case if they are not quoted > ? > > stefan Well.. this is because pgadmin created the attribute as "ID" originally so for you - it's always been double-quoted to force the case. I never quote my identifier literals just to avoid all the strange problems (like this) that happen when you do it. It's just a bad idea. Josh ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [SQL] Scan SQL
On Tue, 23 Jul 2002, Roberto Mello wrote: > On Tue, Jul 23, 2002 at 10:11:18AM -0300, Sandro Joel Eller wrote: > > Hi > > > > I need to make a parser in a sql to get tables and fields to verify the > > privileges. Do anybody know software, function or anything that can help me? > > > > I found software to create a compiler and generate the source in delphi, but I > > need a sql specification (BNF, EBNF) and I do not know where to find it. > > You could look at how PostgreSQL does its parsing. The source code is > open. > > -Roberto Check out src/backend/parser/*.y for full YACC grammars. Joshua b. Jore ; http://www.greentechnologist.org ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [SQL] POSIX-style regular expressions
On Tue, 10 Sep 2002, Goran Buzic wrote: > id1char(6) NOT NULL CHECK(id1 ~* '^([0-9]{1,2}\.){2}$'), > ERROR:ExecAppend: rejected due to CHECK constraint table_name1_id1 > > I tested preceding regular expression with Perl and JavaScript and it worked > fine. Can I use regular expressions with CHECK parametar, and if so, how can > I make it work. You should probably test it against PostgreSQL's regex engine. What you may not know is that they all have different syntaxes, rules and quirks. What works in one may or may not work in another. So check out src/backend/regex and build retest (I think that's what it was called). It's a command line regex tester (obviously against PostgreSQL's implementation). Joshua b. Jore -{ weird geeky madness }-> http://www.greentechnologist.org ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster