You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostgreSQL in the inves SqlProvider to guess the name of the sequence he handle the default value of the column
Problem: This may generate error for those not referenced sequence at the default value of the column
Alternative: It would use the return already available in version ~ 8 (More would have to identify the version to change the method as version support)
New:
varname=attr!=null?"'"+attr.SequenceName+"'":Convert(string.Format("( SELECT "+@" CASE WHEN (pg_attrdef.adsrc ~* 'nextval') is null"+@" then null"+@" else SUBSTRING(pg_attrdef.adsrc FROM E'nextval\\(''([^'')]+)''') "+@" end as NameSequence "+@" FROM pg_attribute "+@" LEFT JOIN pg_attrdef ON (pg_attribute.attrelid = pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum) "+@" INNER JOIN pg_class ON (pg_attribute.attrelid = pg_class.oid) "+@" WHERE lower(pg_class.relname) = lower('{0}') "+@" and lower(pg_attribute.attname) = lower('{1}') "+")",into.PhysicalName,into.GetIdentityField().PhysicalName),ConvertType.NameToQueryField);AppendIndent(sb).Append("SELECT currval(").Append(name).AppendLine(")");
PostgreSQL in the inves SqlProvider to guess the name of the sequence he handle the default value of the column
New:
Old:
The text was updated successfully, but these errors were encountered: