Re: [SQL] psql client: technique for applying default values to :variables?

2006-01-16 Thread Andreas Seltenreich
Jeff Boes writes: > Michael Glaesemann wrote: >> You could write a wrapper script that would accept a command line >> argument and load the file with the appropriate SET statement prepended. > > Which really gains me nothing over just: > > $ psql -f myscript.sql -v "MYVAR=${myvar:-default}" > > Th

Re: [SQL] Problem with a Pettern Matching Check

2005-08-15 Thread Andreas Seltenreich
Sebastian Siewior schrob: > Hello hopefully correct List, perfectly. > I was trying to do something that is not working as it supposed to. > First I created a table: > > create table t ( > col CHAR (3) CONSTRAINT numonly_col CHECK ( col ~ '^\\d+$' ) > ); > > This check avoids non-numbers like

Re: [SQL] COMMENT ON CONSTRAINT

2004-08-15 Thread Andreas Seltenreich
Sascha Ziemann writes: > it is defined in this way: [...] > CONSTRAINT constraint_name ON table_name | Well then... > comment on constraint uni on table tab3 is 'unique pair'; ^ ...why do you insert "table" when it is defined without? :-) regards Andreas --