Cedric Carree wrote: > Hi list, > > It appears that the PostgreSQL parser fail to parse "CREATE TABLE" > statements when a field definition contains a default value which is > explicitly casted. > For example, the following table definition can't be parsed (due to the > "::text" part) > > CREATE TABLE foo ( > bar TEXT DEFAULT 'this is casted default text'::TEXT > ); > > > I found the bug using a dump of my db created by the tool pg_dump. > > I created a patch. See the attached file. I also created a branch > (named pgsql_default_value) on the git repo, which contains exactly the > same thing as the attached file. > > Cedric > >
Erm... no you didn't. You however pushed a weird (see below) content-less multi-merge to the master branch. I am going to unwind it, hopefully not many people have cloned since then. Please be careful when doing pushing: `git push` means "push master" which is rarely what one wants. Instead you want `git push origin <branchname|HEAD>` * 935e82f (origin/master, origin/HEAD) Merge branch 'master' of git.shadowcat.co.uk:SQL-Translator |\ | * d0a4031 (HEAD, master) Add (now passing) test with file from RT#70473 | * 34248db Change mysql parser to throw exceptions on unspecified default values (RT#4835) | * 67a44d6 Add giftnuss to contributors, awesome triage work | * 936e626 Integer default sizes are one point smaller if they are unsigned | * 55da13f Name of unique keys are not written if empty | * 1687dad Names accepted (and ignored) as types of primary keys in create tables | * 22529e3 MySQL parsing fails if a table is defined more than once in the same file, if not, indices are messed up | * bc9932b Default bits and double quoted strings are parsed now | * c092c5b patch from rt67989 applied, changes dependency from Digest::SHA1 to Digest::SHA | * d8cf227 quote SQLite identifiers | * 95044c7 better error messages for the SQLite parser | * c96cd4a Add trigger support to PostgreSQL producer and parser (including trigger scope) | * 20530f3 Avoid warning about exiting sub with next | * d06db85 Fix POD for Schema::Index::type method | * 6f2cf9c fix doc typo | * 0c04c5a our > use vars | * f27f922 use warnings | * df39971 remove commented copyright | * 282bf49 take out duplicate docs | * ea93df6 Whitespace | * 0d3badf Handle on_delete => 'restrict' in Producer::Oracle | * 5863ad8 Call ->on_delete & ->on_update in SCALAR context not in LIST context | * 56785c0 added kaitlyn's patch for mysql->sqlite translation | * a1afcdb binmode STDOUT to not generate garbage in a UTF-8 environment (bug #71399) | * 2627fb5 image is returned, not written w/o out_file (bug #71398) | * b3d7397 gitignoring | * 681dc48 added a working mechanism for naming foreign keys | * c50d1a0 fixed alter_drop_constraint for foreign keys and applying multiple changes via alter_field to a column in Postgres Producer | * fd52d7d get Postgres table and column descriptions | * c601ca5 Fix index issue in Parser::DBI::PostgreSQL | * a23f9a9 Patch to get correct SQL data types from Postgres | * 122353c Create unit test for ::Parser::DBI::PostgreSQL, fix parser namespace lookup * | 542c233 Merge branch 'master' of git.shadowcat.co.uk:SQL-Translator |\ \ | |/ | * 685e67e (tag: v0.11010) Release 0.11010 * | 8136533 Merge branch 'create_view' |\ \ | |/ | * 25c74c4 Add test for DROP VIEW IF EXISTS * | 9d5ec1b Add proper version (0.11010) to base class. * | 92a4263 Update Changes file for 0.11010 |/ * 0e75801 Fix CREATE VIEW syntax. ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev -- sqlfairy-developers mailing list sqlfairy-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers